Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-02

ClrScr problem under Win 2K

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

I'm running VP under Windows 2000, and I can't get ClrScr to work. The program will compile OK, but when I run it ClrScr has no effect. Can anyone please help?

Here's an example:

program user_menu;
uses Crt;
var menu_choice:integer;
procedure initialise;
begin
menu_choice:=0;
end;
procedure display_menu;
begin
ClrScr;
writeln('User Menu');
writeln;
writeln;
writeln('First Menu Item           (1)');
writeln;
writeln('Second Menu Item          (2)');
writeln;
writeln('Quit                      (3)');
writeln;
writeln;
writeln;
writeln('Enter the number corresponding to your chosen item');
writeln;
readln(menu_choice);
end;
procedure process_item_one;
begin
ClrScr;
writeln('You heve chosen item one');
writeln;
writeln;
writeln('Press enter to return to the main menu screen');
readln;
end;
procedure process_item_two;
begin
ClrScr;
writeln('You have chosen item two');
writeln;
writeln;
writeln('Press enter to return to the main menu screen');
readln;
end;
procedure get_choice;
begin
if menu_choice= 1 then
        process_item_one
else
if menu_choice=2 then
        process_item_two;
end;
begin
repeat
        display_menu;
        get_choice;
until menu_choice = 3
end.

Reply by email

Marco van de Voort
to Unknown author
I'm running VP under Windows 2000, and I can't get ClrScr to work. The program will compile OK, but when I run it ClrScr has no effect. Can anyone please help?

This is no VP maillist but a FPC maillist. VP does have an own maillist somewhere (see the site)

The code looks ok. (do you execute in a command.com or cmd.exe shell? If cmd.exe try command.com and vice versa). For more VP internal info I can only refer you to the VP list.

Reply by email