home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_01_03 / 1n03043a < prev    next >
Text File  |  1990-07-08  |  801b  |  27 lines

  1.  
  2. FIGURE 2, Sample TCL program.
  3.  
  4. program check_mult;            {check multiplication function}
  5. var n1,n2:integer;
  6. begin
  7.   for n1:=0 to 100 do
  8.   begin
  9.     for n2:=0 to 100 do
  10.     begin
  11.       key n1;                  {send n1 to target application}
  12.       key "*";                 {multiplication symbol}
  13.       key n2 format "%d<ent>"; {send n2 formatted decimal,
  14.                                    followed by enter key}
  15.       verify n1*n2 ABS 10,10;  {verify the calculation results at
  16.                                    row 10, col 10 of screen}
  17.       if error then
  18.       begin
  19.         gotoxy(11,11);         {move cursor on host screen}
  20.         writeln("ERROR");      {output to host screen}
  21.         halt;                  {stop the program}
  22.       end;
  23.     end;
  24.   end;
  25. end
  26.  
  27.