so lets say i have a program and it keeps on outputting the letter 'A' constantly until the user presses enter or something. then it will exit the loop and continue with the rest of the program. how would i do this?

Hi Killhha
one solution :

{
so lets say i have a program and it keeps on
outputting the letter 'A' constantly until
the user presses enter or something.
then it will exit the loop and continue with
the rest of the program. how would i do this?
}

Program solution;

Uses Crt;

Begin
     Repeat
        Write('A');
     Until KeyPressed;
     WriteLn;
     Write('Press enter to continue..');
     ReadLn;
     Write('Press Enter to quit');
     ReadLn;
End.

{
-=Created By FlamingClaw 2009.06.12=-
}

and the another one... :D

{
so lets say i have a program and it keeps on
outputting the letter 'A' constantly until
the user presses enter or something.
then it will exit the loop and continue with
the rest of the program. how would i do this?
}

Program solution;

Uses Crt;
Var i:Byte;
Begin
     i:=1;
     {the infinite loop}
     While (i<3) Do Begin
        Write('A');
        If (KeyPressed = True) Then Break;
     End;
     {the rest of the main program}
     WriteLn;
     Write('Press enter to continue..');
     ReadLn;
     Write('Press Enter to quit');
     ReadLn;
End.

{
-=Created By FlamingClaw 2009.06.12=-
}
Comments
Always very helpful :)
Thanks for helping out with my problem
This question has already been answered. Start a new discussion instead.