100  REM *** Memo Supervisor - see EDIT0.A001 for remarks ***
140  DIM A$[255],B$[255],N$[20],N0$[20],N1$[20]
150  DIM O$[80],P$[40],R$[255],S$[100],T$[255],N[4]
160  A=B=C=F=F1=F8=F9=1=2
170  FOR X=1 TO 100
180  S$[X,X]=" "
190  NEXT X
200  SYSTEM A$,"TIME"
210  IF POS("A0A1X1X2X3",A$[1,2]) THEN 230
220  END 
230  PRINT "*** Memo Supervisor ***";LIN(1)
240  REM *** Set up files ***
250  FILES *,*,*
260  N$="ZMEMON.A001"
270  N0$="ZMEMOF.A001"
280  N1$="ZMEMOS.A001"
290  ASSIGN N$,1,R,"KRETZ", PR 
300  IF R#0 THEN 370
310  ASSIGN N0$,2,R,"O5BLI", PR 
320  IF R#0 THEN 370
330  ASSIGN N1$,3,R,"KRETZ", PR 
340  IF R#0 THEN 370
350  GOTO 390
360  REM *** Assign error ***
370  PRINT LIN(1);"Memo system in use.  Try later."
380  END 
390  REM *** User input ***
391  GOTO TYP(2) OF 392,396,398
392  READ #2;N
393  A=A+.25
394  GOTO 391
396  READ #2;A$
397  GOTO 391
398  PRINT  USING 399;A
399  IMAGE "There are ",ddd," active memos."
400  PRINT LIN(1);">";
410  LINPUT R$
420  R$=UOS$(R$)
430  Y=POS(R$,"-")
440  READ #1,1
450  READ #2,1
460  READ #3,1
470  F9=0
480  IF R$[1,2]#"//" THEN 510
490  GOSUB POS("BCHMPRS",R$[3,3]) OF 6110,5990,6280,5970,6160,5950,6220
500  GOTO 400
510  GOSUB POS("ACDFKLOPRSU",R$[1,1]) OF 540,1430,2650,3870,3230,1650,2260,4560,4930,5190,5680
520  GOTO 400
530  REM *** Add a user ***
540  F=0
550  IF Y#0 AND Y#LEN(R$) THEN 720
560  R$=""
570  PRINT "User name : ";
580  LINPUT A$
590  R$[1,1]=" "
600  R$[2]=A$
605  IF F8=0 THEN 620
610  SYSTEM R,"ECHO-OFF"
620  PRINT "Password  : ";
630  LINPUT A$
632  IF F8=0 THEN 650
634  PRINT 
640  SYSTEM R,"ECHO-ON"
650  R$[LEN(R$)+1]=","
660  R$[LEN(R$)+1]=A$
670  PRINT "Account   : ";
680  LINPUT A$
690  R$[LEN(R$)+1]=";"
700  R$[LEN(R$)+1]=A$
710  GOTO 740
720  R$[2]=R$[Y+1]
730  R$[1,1]=" "
740  REM *** Check if name is valid ***
750  L=POS(R$,".")
760  M=POS(R$,",")
770  N=POS(R$,";")
780  IF L=0 OR M=0 OR N=0 OR N<M OR M<L THEN 1240
790  REM *** Duplicate name or account check ***
800  READ #1,1
810  IF  END #1 THEN 900
820  READ #1;A$
830  IF A$[2,M MAX 2]=R$[2,M] THEN 860
840  IF A$[POS(A$,";")]=R$[N] THEN 880
850  GOTO 820
860  PRINT "Input error - duplicate name of ";R$[2,M];LIN(1)
870  RETURN 
880  PRINT "Input error - duplicate account of ";R$[N+1];LIN(1)
890  RETURN 
900  REM *** Sort by name ***
910  READ #1,1
920  IF  END #1 THEN 1020
930  READ #1;A$
940  F=F+1
950  IF A$[4,4]<R$[4,4] THEN 930
960  IF A$[4,4]=R$[4,4] THEN 980
970  GOTO 1020
980  FOR X=4 TO M-1
990  IF A$[X,X]>R$[X,X] THEN 830
1000  IF A$[X,X]<R$[X,X] THEN 930
1010  NEXT X
1020  REM *** Put user into the file ***
1030  READ #1,1
1040  IF  END #1 THEN 1350
1050  IF  END #3 THEN 1350
1060  FOR X=1 TO F-1
1070  READ #1;A$
1080  PRINT #3;A$; END 
1090  NEXT X
1100  PRINT #3;R$; END 
1110  IF  END #1 THEN 1150
1120  READ #1;A$
1130  PRINT #3;A$; END 
1140  GOTO 1120
1150  READ #1,1
1160  READ #3,1
1170  IF  END #1 THEN 1350
1180  IF  END #3 THEN 1220
1190  READ #3;A$
1200  PRINT #1;A$; END 
1210  GOTO 1190
1220  PRINT "User ";R$[2,M-1];" added.";LIN(1)
1230  RETURN 
1240  REM *** Bad input format error ***
1250  PRINT "Bad input - please enter the user in the form:"
1260  PRINT "J.SMITH,PASSWORD;A000.";LIN(1)
1270  F9=1
1280  RETURN 
1290  REM *** Bad input length error ***
1300  PRINT "Input error - the name and password may be up to"
1310  PRINT "14 characters in length apiece and the account may"
1320  PRINT "up to 4 characters long.";LIN(1)
1330  F9=1
1340  RETURN 
1350  REM *** File length error ***
1360  CONVERT SYS(2) TO A$
1370  PRINT "File error - file #";A$;" is too short.";LIN(1)
1380  F9=1
1390  RETURN 
1400  REM *** Crush ID file ***
1410  REM *** read names, remove illegally entered ones ***
1420  REM *** and put the names into the scratch file   ***
1430  IF  END #1 THEN 1490
1440  IF  END #3 THEN 1600
1450  READ #1;A$
1460  IF LEN(A$)=0 OR POS(A$,",")=0 OR POS(A$,";")=0 THEN 1450
1470  PRINT #3;A$; END 
1480  GOTO 1450
1490  REM *** Put the names back into ID file from scratch file ***
1500  READ #1,1
1510  READ #3,1
1520  IF  END #1 THEN 1590
1530  IF  END #3 THEN 1570
1540  READ #3;A$
1550  PRINT #1;A$; END 
1560  GOTO 1540
1570  PRINT LIN(1);"ID file crushed.";LIN(1)
1580  RETURN 
1590  REM *** File length error ***
1600  PRINT "File error - file is too short.";LIN(1)
1610  F9=1
1620  RETURN 
1640  REM *** List a message by number ***
1650  A=B=1=2
1655  IF Y#0 AND Y#LEN(R$) THEN 1690
1660  PRINT LIN(1);"List which message? ";
1670  LINPUT R$
1680  Y=0
1690  CONVERT R$[Y+1] TO A,2943
1700  IF  END #2 THEN 2210
1710  MAT  READ #2;N
1720  B=B+1
1730  IF A=B THEN 1770
1740  IF TYP(2)=1 THEN 1710
1750  READ #2;A$
1760  GOTO 1740
1770  READ #2;A$,B$
1780  REM *** Set up data string ***
1790  O$="00)                                00/00/00 0000 P   "
1800  CONVERT A TO O$[1+(A<10),2]
1810  O$[6,19]=A$
1820  O$[21,34]=B$
1830  DATA 31,28,31,30,31,30,31,31,30,31,30,31
1840  RESTORE 1830
1850  D=N[2]
1860  FOR X=1 TO 12
1870  READ M
1880  M=M+((X=2) MIN (TIM(3)/4=INT(TIM(3)/4)))
1890  IF D <= M THEN 1920
1900  D=D-M
1910  NEXT X
1920  CONVERT X TO O$[36+(X<10),37]
1930  CONVERT D TO O$[39+(D<10),40]
1940  CONVERT ABS(N[3]) TO O$[42,43]
1950  CONVERT N[4] TO O$[45+(N[4]<1000),48]
1960  REM *** Determine status of active memo ***
1970  IF B$#"ALL" THEN 2010
1980  O$[50,50]="A"
1990  CONVERT N[1]-TIM(2) TO O$[51,51+(N[1]-TIM(2)>9)]
2000  GOTO 2080
2010  IF N[1]=0 THEN 2040
2020  O$[50,50]="R"
2030  CONVERT N[1]-TIM(2) TO O$[51+(N[3]<0),51+(N[1]-TIM(2)>9)+(N[3]<0)]
2040  IF N[3]>0 THEN 2070
2050  O$[51,51]="C"
2060  REM *** Print out the memo ***
2070  PRINT LIN(1);O$;LIN(1)
2080  A=B=1=2
2090  IF TYP(2)#2 THEN 2150
2100  READ #2;A$
2110  A=A+1
2120  B=B+LEN(A$)
2130  PRINT A$
2140  GOTO 2090
2150  CONVERT A TO A$
2160  PRINT LIN(1);"This memo is ";A$;" lines long (";
2170  CONVERT B TO A$
2180  PRINT A$;" bytes)."
2190  RETURN 
2200  REM *** No such memo error ***
2210  CONVERT A TO A$
2220  PRINT LIN(1);"No such memo #";A$;" exists.";LIN(1)
2230  F9=1
2240  RETURN 
2250  REM *** Obliterate a user's ID by name or account ***
2260  IF Y#0 AND Y#LEN(R$) THEN 2300
2270  PRINT "Obliterate whom, master? ";
2280  LINPUT R$
2290  GOTO 2330
2300  R$=R$[Y+1]
2310  REM *** Transfer IDs to scratch file, remove specified ID ***
2320  REM *** and move IDs back into name file                  ***
2330  IF  END #1 THEN 2600
2340  IF  END #3 THEN 2550
2350  READ #1;A$
2355  B$=A$[POS(A$,";")+1]
2360  IF POS(A$[2,POS(A$,",")-1],R$)#0 OR POS(B$,R$)#0 THEN 2390
2370  PRINT #3;A$
2380  GOTO 2350
2390  R$=A$
2400  IF  END #1 THEN 2440
2410  READ #1;A$
2420  PRINT #3;A$, END 
2430  GOTO 2410
2440  READ #1,1
2450  READ #3,1
2460  IF  END #1 THEN 2550
2470  IF  END #3 THEN 2510
2480  READ #3;A$
2490  PRINT #1;A$, END 
2500  GOTO 2480
2510  PRINT LIN(1);"User ";R$[2,POS(R$,",")-1];" (";
2520  PRINT R$[POS(R$,";")+1];") obliterated...utterly.";LIN(1)
2530  RETURN 
2540  REM *** File length error ***
2550  CONVERT SYS(2) TO A$
2560  PRINT "File length error - file #";A$;" is too short.";LIN(1)
2570  F9=1
2580  RETURN 
2590  REM *** No such user or account error ***
2600  PRINT "Input error - no such user or account ";R$;" exists.";LIN(1)
2610  F9=1
2620  RETURN 
2630  REM *** Show directory of active memos with starting ***
2640  REM *** memo number option                           ***
2650  PRINT LIN(1);"No.  From           To               Date   Time Sta Len"
2660  PRINT "---  -------------- -------------- -------- ---- --- ---"
2665  A=1
2666  B=C=1=2
2670  IF Y=0 OR Y=LEN(R$) THEN 2690
2680  CONVERT R$[Y+1] TO A,5124
2690  GOTO TYP(2) OF 2700,3130,3110
2700  MAT  READ #2;N
2710  READ #2;A$,B$
2730  IF TYP(2)#2 THEN 2760
2740  READ #2;R$
2745  C=C+1
2750  GOTO 2730
2760  B=B+1
2770  IF A>B THEN 2690
2780  REM *** Set up data string ***
2785  O$="00)                                00/00/00 0000 P   000"
2790  CONVERT B TO O$[1+(B<10),2]
2800  O$[6,19]=A$
2810  O$[21,34]=B$
2820  DATA 31,28,31,30,31,30,31,31,30,31,30,31
2830  RESTORE 2820
2840  D=N[2]
2850  FOR X=1 TO 12
2860  READ M
2870  M=M+((X=2) MIN (TIM(3)/4=INT(TIM(3)/4)))
2880  IF D <= M THEN 2910
2890  D=D-M
2900  NEXT X
2910  CONVERT X TO O$[36+(X<10),37]
2920  CONVERT D TO O$[39+(D<10),40]
2930  CONVERT ABS(N[3]) TO O$[42,43]
2940  CONVERT N[4] TO O$[45+(N[4]<1000),48]
2950  REM *** Find status of memo ***
2960  IF B$#"ALL" THEN 3000
2970  O$[50,50]="A"
2980  CONVERT N[1]-TIM(2) TO O$[51,51+(N[1]-TIM(2)>9)]
2990  GOTO 3050
3000  IF N[1]=0 THEN 3030
3010  O$[50,50]="R"
3020  CONVERT N[1]-TIM(2) TO O$[51+(N[3]<0),51+(N[1]-TIM(2)>9)+(N[3]<0)]
3030  IF N[3]>0 THEN 3060
3040  O$[51,51]="C"
3050  REM *** Insert length of memo into data string ***
3060  CONVERT C TO O$[55+(C<10),56]
3065  C=0
3070  REM *** Print the data string ***
3080  PRINT O$
3090  GOTO 2690
3100  REM *** All done printing directory ***
3110  PRINT 
3120  RETURN 
3130  REM *** Impossible error ***
3140  PRINT LIN(1);'7"File error - string found instead of numeric data."
3150  PRINT "Immediate attention required."'7;LIN(1)
3160  F9=1
3170  RETURN 
3180  REM *** Data input error ***
3190  PRINT LIN(1);"Input error - illegal starting memo number of ";R$[Y+1];LIN(1)
3200  F9=1
3210  RETURN 
3220  REM *** Kill a memo by number with to end of file option ***
3230  IF Y#0 AND Y#LEN(R$) THEN 3270
3240  PRINT "Kill which memo? ";
3250  Y=0
3260  LINPUT R$
3270  F=0
3280  IF POS(R$,",END")=0 THEN 3300
3290  F=1
3292  CONVERT R$[Y+1,POS(R$,",")-1] TO A,5782
3295  GOTO 3310
3300  CONVERT R$[Y+1] TO A,5782
3310  IF A>1 THEN 3360
3315  IF A=1 AND F=0 THEN 3500
3320  IF F=0 THEN 3740
3330  PRINT #2; END 
3340  PRINT LIN(1);"Memo file cleared.";LIN(1)
3350  RETURN 
3360  B=0
3370  GOTO TYP(2) OF 3380,3780,3830
3380  B=B+1
3390  MAT  READ #2;N
3400  MAT  PRINT #3;N, END 
3410  IF TYP(2)#2 THEN 3450
3420  READ #2;A$
3430  PRINT #3;A$, END 
3440  GOTO 3410
3450  IF B#A-1 THEN 3370
3460  IF F=0 THEN 3500
3470  PRINT #2; END 
3480  PRINT LIN(1);"MEMO FILE CLEARED FORM MEMO #";
3485  PRINT R$[Y+1,POS(R$,",")-1];" TO END.";LIN(1)
3490  RETURN 
3500  MAT  READ #2;N
3510  IF TYP(2)#2 THEN 3540
3520  READ #2;A$
3530  GOTO 3510
3540  IF  END #2 THEN 3620
3550  MAT  READ #2;N
3560  MAT  PRINT #3;N, END 
3570  IF TYP(2)#2 THEN 3550
3580  READ #2;A$
3590  PRINT #3;A$, END 
3600  GOTO 3570
3610  REM *** Put memos back into memo file from scratch file ***
3620  READ #2,1
3630  READ #3,1
3640  IF  END #3 THEN 3710
3650  MAT  READ #3;N
3660  MAT  PRINT #2;N, END 
3670  IF TYP(3)#2 THEN 3650
3680  READ #3;A$
3690  PRINT #2;A$, END 
3700  GOTO 3670
3710  PRINT LIN(1);"Memo #";R$[Y+1];" killed.";LIN(1)
3720  RETURN 
3730  REM *** Data input error ***
3740  PRINT LIN(1);"Input error - illegal memo number of ";R$[Y+1];LIN(1)
3750  F9=1
3760  RETURN 
3770  REM *** Impossible error ***
3780  PRINT LIN(1);'7"File error - string found instead of numeric data."
3790  PRINT "Immediate attention required."'7;LIN(1)
3800  F9=1
3810  RETURN 
3820  REM *** No such memo error ***
3830  PRINT "Input error - no such memo #";R$[Y+1];".";LIN(1)
3840  F9=1
3850  RETURN 
3860  REM *** Find a user ***
3870  IF Y=0 OR Y=LEN(R$) THEN 3910
3880  R$=R$[Y+1]
3890  GOTO 3930
3900  IF Y=0 OR Y=LEN(R$) THEN 3910
3910  PRINT "Find which user or account? ";
3920  LINPUT R$
3930  IF POS(R$,".")=2 THEN 3970
3940  IF POS(R$,".")#0 OR LEN(R$)#4 THEN 4230
3950  R$[2,5]=R$
3960  R$[1,1]=";"
3970  REM *** Look at IDs in file ***
3980  READ #1,1
3990  IF  END #1 THEN 4270
4000  READ #1;A$
4010  IF A$[2,POS(A$,",")-1]=R$ THEN 4040
4020  IF A$[LEN(A$)-4]=R$ THEN 4040
4030  GOTO 4000
4040  REM *** Print out information ***
4050  PRINT 
4060  PRINT "User ";A$[2,POS(A$,",")-1];": password is ";
4070  IF F8=1 THEN 4100
4080  PRINT A$[POS(A$,",")+1,POS(A$,";")-1]
4090  GOTO 4110
4100  PRINT "::::::"
4110  PRINT "and account is ";A$[POS(A$,";")+1];".  The user's access"
4120  PRINT "status is ";
4130  IF A$[1,1]="*" THEN 4160
4140  PRINT "unrestricted and ";
4150  GOTO 4170
4160  PRINT "restricted and ";
4170  B$=A$[POS(A$,";")+1,POS(A$,";")+2]
4180  IF POS("A0A1X1X2",B$)#0 THEN 4210
4190  PRINT "unpriviledged.";LIN(1)
4200  GOTO 4220
4210  PRINT "priviledged.";LIN(1)
4220  RETURN 
4230  REM *** Illegal name or account error ***
4240  PRINT "Input error - illegal name or account of ";R$;LIN(1)
4250  F9=1
4260  RETURN 
4270  REM *** No such user or account error ***
4280  IF R$[1,1]=";" THEN 4310
4290  PRINT "Input error - no such user ";R$;" exists.";LIN(1)
4300  GOTO 4320
4310  PRINT "Input error - no such account ";R$[2,5];" exists.";LIN(1)
4320  F9=1
4330  RETURN 
4540  REM *** Print out a complete list of user IDs ***
4550  REM *** with restricted/unrestricted option   ***
4560  A$=" *"
4570  IF Y=0 OR Y=LEN(R$) THEN 4660
4580  IF R$[Y+1,Y+1]#"R" THEN 4610
4590  A$="*"
4600  GOTO 4660
4610  IF R$[Y+1,Y+1]#"U" THEN 4640
4620  A$=" "
4630  GOTO 4660
4640  IF R$[Y+1,Y+1]#"A" THEN 4850
4650  REM *** Option chosen - print out list ***
4660  PRINT LIN(1);"*User name","Password","Account"
4670  F=0
4680  IF  END #1 THEN 4810
4690  READ #1;R$
4700  IF POS(R$,".")#0 AND POS(R$,",")#0 AND POS(R$,";")#0 THEN 4730
4710  F=1
4720  GOTO 4690
4730  IF POS(A$,R$[1,1])=0 THEN 4800
4740  PRINT R$[1,POS(R$,",")-1],
4750  IF F8=0 THEN 4780
4760  PRINT "::::::::",
4770  GOTO 4790
4780  PRINT R$[POS(R$,",")+1,POS(R$,";")-1],
4790  PRINT R$[POS(R$,";")+1]
4800  GOTO 4690
4810  IF F=0 THEN 4830
4820  PRINT LIN(1);'7"File should be crushed.";
4830  PRINT LIN(1);"Done."
4840  RETURN 
4850  REM *** Illegal option error ***
4860  PRINT "Option error - legal options are <R>estricted users, <U>nrestricted"
4870  PRINT "users, and <A>ll users.  All is default.";LIN(1)
4880  F9=1
4890  RETURN 
4900  REM *** Restrict a user's access to Memo           ***
4910  REM *** find the user, check his status, change it ***
4920  REM *** if necessary and store it                  ***
4930  IF Y#0 AND Y#LEN(R$) THEN 4970
4940  PRINT "Restrict which user? ";
4950  LINPUT R$
4955  IF R$="" THEN 5150
4960  GOTO 4980
4970  R$=R$[Y+1,LEN(R$)]
4980  IF  END #1 THEN 5140
4990  READ #1;A$
5000  IF A$[2,POS(A$,",")-1]#R$ THEN 4990
5010  IF A$[1,1]#"*" THEN 5050
5020  PRINT A$[2,POS(A$,",")-1];" was already restricted.";LIN(1)
5030  RETURN 
5040  REM *** Update the file with the changed ID ***
5050  A$[1,1]="*"
5060  O=REC(1)
5070  P=ITM(1)-1
5080  READ #1,O
5090  IF P<1 THEN 5110
5100  ADVANCE #1;P,R
5110  UPDATE #1;A$
5120  PRINT A$[2,POS(A$,",")-1];" is now restricted.";LIN(1)
5130  RETURN 
5140  REM *** No such user error ***
5150  PRINT "Input error - no such user ";R$;" exists.";LIN(1)
5160  F9=1
5170  RETURN 
5180  REM *** Status of memo files ***
5190  F9=0
5200  REM *** Look at ID file ***
5210  READ #1,1
5220  A=B=C=F=1=2
5230  IF  END #1 THEN 5350
5240  READ #1;A$
5250  IF POS(A$,".")#0 AND POS(A$,",")#0 AND POS(A$,";")#0 THEN 5280
5260  F=1
5270  GOTO 5240
5280  A=A+1
5290  IF A$[1,1]="*" THEN 5310
5300  B=B+1
5310  B$=A$[POS(A$,";")+1,POS(A$,";")+2]
5320  IF POS("A0A1X1X2",B$)=0 THEN 5340
5330  C=C+1
5340  GOTO 5240
5350  REM *** Print out the information about ID file ***
5360  PRINT 
5370  PRINT "There are ";
5380  CONVERT A TO A$
5390  PRINT A$;" memo users: ";
5400  CONVERT B TO A$
5410  CONVERT A-B TO B$
5420  PRINT A$;" have unrestricted access"
5430  PRINT "and ";B$;" have restricted access."
5440  CONVERT C TO A$
5450  PRINT "There are ";A$;" priviledged users."
5460  CONVERT REC(1)*2 TO A$
5470  PRINT "The user ID file is ";A$;"% full.";LIN(1)
5480  REM *** Look at memo file ***
5490  A=0
5500  IF  END #2 THEN 5570
5510  MAT  READ #2;N
5520  A=A+1
5530  IF TYP(2)=1 THEN 5510
5540  READ #2;A$
5550  GOTO 5530
5560  REM *** Print out information about memo file ***
5570  CONVERT A TO A$
5580  PRINT "There are ";A$;" active memos and the"
5590  CONVERT REC(2) TO A$
5600  PRINT "memo file is ";A$;"% full."
5610  PRINT 
5620  RETURN 
5650  REM *** Unrestrict a user's access to Memo         ***
5660  REM *** find the user, check his status, change it ***
5670  REM *** if necessary and store it                  ***
5680  IF Y#0 AND Y#LEN(R$) THEN 5720
5690  PRINT "Unrestrict which user? ";
5700  LINPUT R$
5705  IF R$="" THEN 5900
5710  GOTO 5730
5720  R$=R$[Y+1,LEN(R$)]
5730  IF  END #1 THEN 5890
5740  READ #1;A$
5750  IF A$[2,POS(A$,",")-1]#R$ THEN 5740
5760  IF A$[1,1]#" " THEN 5800
5770  PRINT A$[2,POS(A$,",")-1];" was already unrestricted.";LIN(1)
5780  RETURN 
5790  REM *** Put the changed ID back into the file ***
5800  A$[1,1]=" "
5810  O=REC(1)
5820  P=ITM(1)-1
5830  READ #1,O
5840  IF P<1 THEN 5860
5850  ADVANCE #1;P,R
5860  UPDATE #1;A$
5870  PRINT A$[2,POS(A$,",")-1];" is now unrestricted.";LIN(1)
5880  RETURN 
5890  REM *** No such user error ***
5900  PRINT "Input error - no such user ";R$;" exists.";LIN(1)
5910  F9=1
5920  RETURN 
5930  REM *** Housekeeping routines ***
5940  REM *** Chains ***
5950  CHAIN R,"$REPGEN"
5960  GOTO 6070
5970  CHAIN R,"$MEMO"
5980  GOTO 6070
5990  IF Y#0 OR Y#LEN(R$) THEN 6030
6000  PRINT "Chain to what program? ";
6010  LINPUT R$
6020  GOTO 6040
6030  R$=R$[Y+1,LEN(R$)]
6040  CHAIN R,R$
6050  GOTO 6070
6060  REM *** Failed chain error ***
6070  PRINT "Chain failed.";LIN(1)
6080  F9=1
6090  RETURN 
6100  REM *** //Bye - logs account off of system ***
6110  SYSTEM F9,"BYE"
6120  PRINT '7"Logoff failed.";LIN(1)
6130  F9=1
6140  RETURN 
6150  REM *** //Password - toggles show/not show password switch ***
6160  F8= NOT F8
6170  IF F8=1 THEN 6200
6180  PRINT LIN(1);"Passwords will be shown.";LIN(1)
6190  RETURN 
6200  PRINT LIN(1);"Passwords will not be shown.";LIN(1)
6210  RETURN 
6220  REM *** //Stop - closes files, ends program ***
6230  ASSIGN *,1
6240  ASSIGN *,2
6250  ASSIGN *,3
6260  END 
6270  REM *** //Help - prints out list of instructions ***
6280  PRINT LIN(1);"Commands available for use:";LIN(1)
6290  PRINT "Add        - adds a user ID to the Memo system."
6300  PRINT "Crush      - crushes the user ID file."
6310  PRINT "Directory  - shows a directory of active memos."
6320  PRINT "Find       - displays information about an ID by name or account."
6321  PRINT "Kill       - kills an active memo."
6322  PRINT "List       - lists an active memo."
6323  PRINT "Obliterate - obliterates a user ID from the memo system."
6324  PRINT "Print      - prints out a list of user IDs."
6325  PRINT "Restrict   - restricts a user's access to the memo system."
6330  PRINT "Status     - shows the current status of the Memo system."
6340  PRINT "Unrestrict - unrestricts a user's access to the Memo system. <default>"
6350  PRINT LIN(1);"//Memo     - chains to $MEMO."
6360  PRINT "//Repgen   - chains to $REPGEN."
6370  PRINT "//Chain    - chains to a specified program."
6380  PRINT "//Password - toggles password display switch."
6390  PRINT "//Stop     - ends program."
6400  PRINT "//Bye      - logs account off of system."
6410  PRINT "//Help     - displays these instructions."
6420  PRINT LIN(1);"User IDs must be entered in the form:"
6430  PRINT "J.DOE,PASSWORD;A000."
6440  RETURN 
6450  END 
