home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / 30TURUTL / DEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1985-02-18  |  2KB  |  61 lines

  1. {$I Vars.incs}
  2. {$I Writelin.inc}
  3. {$I Writexy.inc}
  4.  
  5. var in_string,st: string[80];
  6.     xx       : integer;
  7.     ch       : char;
  8.     ok       : boolean;
  9.  
  10. Begin {Video_demo}
  11.       line_pos:=0;
  12.       textcolor(15);
  13.       writeln('Writelin and Writexy Demo Program');
  14.  
  15.       write('Enter your Name: ');
  16.       readln(in_string);
  17.       clrscr;
  18.       Write('Here is a little demo with the standard Pascal Procedures, hit a key...');
  19.       repeat until keypressed;
  20.       read(kbd,ch);
  21.       gotoxy(19,24);
  22.       textcolor(white+blink);
  23.       write('Hit Any key to Advance, may take more than once..');
  24.       ok:=false;
  25.       repeat
  26.             if keypressed then ok:=true;
  27.             gotoxy(random(80),random(22));
  28.             if keypressed then ok:=true;
  29.             textcolor(random(15));
  30.             if keypressed then ok:=true;
  31.             write(in_string);
  32.       until ok or keypressed;
  33.       clrscr;
  34.       textcolor(15);
  35.       writeln('Now here is the same demo with the new WRITEXY Procedure, hit a key...');
  36.       repeat until keypressed;
  37.       read(kbd,ch);
  38.       writexy('Hit Any key to Advance',27,24,(15+128));
  39.       repeat
  40.                   writexy(in_string,random(80),random(22),random(15));
  41.       until keypressed;
  42.       read(kbd, ch);
  43.       clrscr;
  44.       textcolor(15);
  45.       writeln('Now I will Print your name 300 times using the Writeln Procedures..');
  46.       repeat until keypressed;
  47.       read(kbd,ch);
  48.       for xx:=1 to 300 do writeln(xx:3,': ',in_string);
  49.       writeln;writeln('Now using the new WRITELIN Procedure...');
  50.       repeat until keypressed;
  51.       read(kbd,ch);
  52.       for xx:=1 to 300 do
  53.                   begin
  54.                       str(xx,st);
  55.                       writelin(st+': '+in_string,11);
  56.                       end;
  57.       writeln;writeln('Hit anu key to end..');
  58.       repeat until keypressed
  59. end.
  60.  
  61.