* TEST.prg - 07/18/89 * Test the UDFs in CV_READ by running a BASIC program and reading the results. * SET DECIMALS TO 8 SET FIXED ON STORE 0 TO out_key DO WHILE out_key <> 27 CLEAR IF FILE("TEST.BAS") RUN BASICA TEST ENDIF STORE SPACE(22) TO txt_str IF FILE("TEST.DAT") handle=FOPEN("TEST.DAT",0) * read "whole" line with all three examples FREAD(handle,@txt_str,22) FCLOSE(handle) ENDIF @ 11,0 SAY REPLICATE("=",80) x1=SUBSTR(txt_str,2,2) x2=SUBSTR(txt_str,7,4) x3=SUBSTR(txt_str,14,8) @ 14,10 SAY "Value returned by CVI("+x1+"): " @ 14,50 SAY CVI(x1) @ 16,10 SAY "Value returned by CVS("+x2+"): " @ 16,50 SAY CVS(x2) @ 17,10 SAY SHOW_BIN(x2) @ 19,10 SAY "Value returned by CVD("+x3+"): " @ 19,50 SAY CVD(x3) @ 20,10 SAY SHOW_BIN(x3) @ 23,05 SAY "Press [Esc] to quit; any other key to repeat ..." out_key=INKEY(0) ENDDO RETURN