Program TSTSNDRCV;

{ Version
  File:[22,310]TSTSNDRCV.PAS
  Author: Jim Bostwick 1-Nov-83
  History:


Testing P3UTIL module(s): SDAT, RCVD

}

{$nolist}
{[a+,b+,l-,k+,r+] Pasmat }
%INCLUDE 'EX:[22,320]GENERAL3.TYP';
%INCLUDE 'EX:[22,320]SDAT.EXT';
%INCLUDE 'EX:[22,320]RCVD.EXT';
%INCLUDE 'EX:[22,320]DIRERR.EXT';
%INCLUDE 'EX:[22,320]CATR56.EXT';
%INCLUDE 'EX:[22,320]CR56TA.EXT';
{$LIST}


VAR
BUFFER:CH26;
BUF2:CH6;
RADNAM, FONAM:RAD56;
OFOO,IFOO:BOOLEAN;

BEGIN
  CATR56('SNDRCV',RADNAM);
  WRITE('Enter message, or ^Z:');
  While Not(EOF(INPUT)) DO
    BEGIN 
    READLN(BUFFER);
    SDAT(RADNAM,BUFFER,f0);  
    ofoo := direrr('send data',$DSW);
    WRITELN('SENT...LOOKING FOR RECEIPT');
    RCVD(FONAM,BUFFER);
    CR56TA(FONAM,BUF2);
    writeln('received from ',buf2);    
    ifoo := direrr('receive data', $DSW);
    if not(ifoo) then WRITELN('GOT THIS:',BUFFER);
    WRITE('ENTER MESSAGE, OR ^Z:')
    END;
  Writeln('End of test.')
END.
