Program  TSTWaitW;

{ Version
  File:[22,310]TSTWAITW.PAS
  Author: Jim Bostwick  20-Oct-83
  History:


Testing P3UTIL module(s): WAITW  (MRKT, WTSE)

}
{$NOLIST}
{[a+,b+,l-,k+,r+] Pasmat }
%INCLUDE 'EX:[22,320]GENERAL3.TYP';
%INCLUDE 'EX:[22,320]WAITW.EXT';
{$LIST}

Procedure sayerr(code:integer);external;


VAR
  i:integer;

BEGIN
{*NOTE*
  This test uses a group-global event flag. If flags for the run-time
  group do not exist, error messages will result. Use the MCR FLAG command
  to create flags for your group, then re-run. Don't forget to destroy
  the flags when you are done...
}
  writeln('wait test.');
  writeln('note: create group global flags to avoid error messages');
  writeln('commence countdown...');
  for i := 5 downto 1 do
    BEGIN 
    writeln(i:1,'.....':i);
    waitw(f90,i,seconds);
    if $DSW < 0 then sayerr($DSW-128)
    end;
  writeln('boom.')
end.
  
