Pascal

eedioteediot Join Date: 2003-02-24 Member: 13903Members
edited June 2003 in Off-Topic
<div class="IPBDescription">Learning pascal, having a small issue</div> okay, in turbo pascal 7.0 i type in:

Program Clear;
uses crt;
begin
WriteLn ('Hello');
ClrScr;
WriteLn ('I am a very sexy monkey');
WriteLn ('whatever');
end.

[right down to the spaces]

now its supposed to clear the screen [which it does], and then write the two lines after it [which it doesnt]

?? help please =/

edit: also, anybody know if it can compile into .exe's? or how to run it? or what compile does, etc? [im doing all this through turbo pascal 7.0] thanks

Comments

  • CrystalSnakeCrystalSnake Join Date: 2002-01-27 Member: 110Members
    Why use Turbo Pascal when there's <a href='http://www.freepascal.org/' target='_blank'>Free Pascal</a>?

    I compiled your program with Free Pascal, and it works as it should.
  • eedioteediot Join Date: 2003-02-24 Member: 13903Members
    oh, its okay, i figured it out

    its kind of sus though =/

    weird program / language / whatever

    haha

    not quite sure WHAT ITS USED FOR

    can you even compile it into an exe?
  • PykmiPykmi Join Date: 2003-04-14 Member: 15473Members
    Only thing your program does, is nothing.

    It's not meant to do anything. Your program prints out those lines, but it closes the program so fast that the user cannot see them.

    First of all, you should add a line

    readln;

    after the line WriteLn ('Hello');

    if you wish to wait for user input before continuing. But if you wish to have a timer, you need to add something like

    delay(time);

    And change the time into something else.

    You should also insert one of those texts, either readln or delay after the line Writeln('Whatever)';

    Your program currently is not waiting for user input after the text, that's the reason for your problem. It displays the text allright, but it also closes the program during the same millisecond.

    Pascal is a darn easy language, and it's a great jump pad to harder languages.
Sign In or Register to comment.