Jump to content

Page:NBS Technical Note 11176 (1983) (IAutilityprogramsf1176dick).djvu/27

From Wikisource
This page has been proofread, but needs to be validated.
1150  IF EF THEN A$ = "N": GOSUB 5180: IF EF = 0 THEN X$ = "E": GOTO 1220
1160  IF EF AND FI THEN  RETURN
1170  IF EF THEN L = L + 1: GOTO 1120
1180 X$ = "":Y$ = ""
1190  PRINT BELL$; TAB( 5);"HOR.COOR:";
1200  PRINT A$;: GET A$: IF A$ <  > " " AND A$  <  >  CHR$  (13) THEN X$ = X
     $ + A$: GOTO 1200                
1210  IF  RIGHT$ (X$,1) =  CHR$ (8) THEN  PRINT BELL$;"REINPUT :":X$ = "":
      GOTO 1190                                                                        
1220  IF X$ = "E" THEN X$(L) = "EOF": PRINT "ND OR FILE...";: PRINT :LMAX =
     L
1230  IF X$ = "E" THEN  PRINT BELL$;"WRITE TO DISK<W> OR RETURN TO MENU <M>
     ?";: GET Q$: PRINT Q$: IF Q$ <  > "W" AND Q$ <  > "M" THEN 1230
1240  IF Q$ = "W" THEN 2000
1250  IF Q$ = "M" THEN  TEXT : GOTO 100
1290  IF X$ = "" THEN X$(L) =X$(L) +   CHR$ (127):PF =  NOT (PF): PRINT BE
     LL$;"PEN CONT.": GOTO 1180
1300  IF X$ = "/" AND  LEN( X$(L)) THEN X$(L) = X$(L) +  CHR$ (127) +  CHR$
     (XF - XT + 93) +  CHR$ (93 - YT): GOTO 1420  
1310  IF X$ = "/" AND  LEN (X$(L)) = 0 THEN  PRINT BELL$;"ERROR..REINPUT"
     : GOTO 1170
1320  PRINT BELL$:" VERT.COOR:";
1330  PRINT B$;: GET B$: IF B$ <  > " " AND B$ <  >  CHR$ (13) THEN Y$ = Y
     $ + B$: GOTO 1330
1340  IF  RIGHT$ (Y$,1) =   CHR$ (8) THEN  PRINT BELL$;"REINPUT :":Y$ = "":
      GOTO 1320
1350  PRINT   
1360  IF  LEN  (X$(L)) = 0 THEN XT =  VAL (X$):XF =  VAL (Y$):W =  ABS (XF -
     XT):YT = 0:X$(L) =   CHR$ (W + 93): GOSUB 8060: GOTO 1170
1370 XC =  VAL (X$):YC =   -  VAL (Y$):X = XC - XT:Y = YC - YT: IF  ABS (X)
      > 32 OR  ABS (Y) >  32 THEN  PRINT BELL$:"TO LARGE A DISPLACEMENT,INP
     UT SMALLER VALUES": GOTO 1170
1380  GOSUB 9080
1390 XT = XC:YT = YC
1400 X$(L) = X$(L) +  CHR$ (X + 93) +  CHR$ (Y + 93): IF PF = 0 THEN X$(L)
      = X$(L) +  CHR$ (127):PF = 1 
1410  GOTO 1170                                                
1420  PRINT "CHARACTER WIDTH=";W                                
1430  PRINT BELL$;"CHARACTER O.K.?";: GET Q$: PRINT Q$: IF Q$ <  > "Y" AND 
     Q$ <  > "N" THEN 1430
1440  IF Q$ = "Y" AND FI THEN   RETURN
1450  IF Q$ = "N" THEN  PRINT BELL$;"RE-INPUT ";
1460 L = L + 1: GOTO 1120
2000  TEXT : HOME : PRINT "WRITE TO FILENAME:";N$: PRINT "DISK DRIVE NO.";
     DO: PRINT BELL$: REM   PUT IT ON DISK DO
2010  PRINT "ARE THESE O.K.? ";: GET A$: PRINT A$: IF A$ <  > "Y" AND A$ <
      > "N" THEN 2010
2020  IF A$ = "Y" THEN 2050
2030  PRINT BELL$;: INPUT FILENAME: ";N$
2040  PRINT BELL$;: INPUT "WRITE TO DISK DRIVE#";DO: IF DO <  1 OR DO > 2 THEN
     2040
2050  PRINT D$;"OPEN ";N$;",D";DO
2060  PRINT D$;"DELETE ";N$
2070  PRINT D$;"OPEN ";N$
2080  PRINT D$;"WRITE ";N$
2090  FOR I= 0 TO L
2100  PRINT X$(I)
2110  NEXT I
2120  PRINT D$;"CLOSE ";N$
2130  TEXT : GOTO 100

18