Advertisement
JeffBobbo

Untitled

Jul 18th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.69 KB | None | 0 0
  1. program RepeatUntil;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   {$IFDEF UNIX}{$IFDEF UseCThreads}
  7.   cthreads,
  8.   {$ENDIF}{$ENDIF}
  9.   Classes
  10.   { you can add units after this };
  11. var
  12.   sel:char;
  13.   quit:bool;
  14.  
  15. {$R *.res}
  16.  
  17. begin
  18.   repeat
  19.     writeln('Do you like "A" or "B"?  ');
  20.     readln(sel);
  21.     quit = false;
  22.     case UpperCase(sel) of
  23.     'A': begin
  24.       writeln('"A" is for Atomic Arachnids');
  25.       quit = true;
  26.     end;
  27.     'B': begin
  28.       writeln('"B" if for Ballistic Bunnies');
  29.       quit = true;
  30.     end;
  31.     else: begin
  32.       writeln('You''re a ninny!');
  33.       end;
  34.   until (quite = true);
  35.  
  36.   end;
  37.   writeln;
  38.   writeln;
  39.   writeln('Press <ENTER> to quit.');
  40.   readln;
  41. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement