home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / CPMUG / CPMUG080.ARK / MMENU.STB < prev    next >
Text File  |  1984-04-29  |  3KB  |  70 lines

  1.  
  2.     9   Rem Copyright 1981 by David E. Trachtenbarg
  3.    10   Dim Today$(5),Last'edited$(5),Last'sorted$(5)
  4.    11   Dim Edit'file$(13),Data'file$(13),Sort'file$(13)
  5.    12   Dim File$(73),Name$(34)
  6.    20   Endcommon
  7.    25   If Today$="" Then Run"DATE.SAV"
  8.    30   Dim Command$(10)
  9.    40   Integer I
  10.    50   Set 0,-1
  11.   110   @ Chr$(7)
  12.   120 *Menu
  13.   130   Gosub Screen'erase
  14.   140   @ : @ : @"*********"
  15.   150   @ : @"Today: ";Today$(0,1);"/";Today$(2,3);"/";Today$(4,5)
  16.   160   @"Last Edited: ";Last'edited$(0,1);"/";Last'edited$(2,3);"/";Last'edited$(4,5)
  17.   170   @ : @ : @"Main Index" : @
  18.   180   @"1. Edit records"
  19.   190   @"2. Print records"
  20.   210   @"3. Change today's date"
  21.   211   @"4. Make a copy of the address file on drive B"
  22.   212   @"5. Quit"
  23.   220   @ : @
  24.   230   Input"Enter the number of your choice. ",Command$
  25.   240   If Command$="" Then Goto Menu
  26.   250   I=Val(Command$)
  27.   260   If I=1 Then Run"REC-EDIT.SAV"
  28.   270   If I=2 Then Run"REC-PRN.SAV"
  29.   280   If I=3 Then Goto Change'date
  30.   282   If I=4 Then Run"BACKUP.SAV"
  31.   285   If I=5 Then Bye
  32.   290   Goto Menu
  33.   300 *Screen'erase
  34.   310   Out 1,126 : Out 1,28 : Return
  35.   320 *Bottom'lines
  36.   330   Out 1,126 : Out 1,17 : Out 1,0 : Out 1,22
  37.   340   Out 1,126 : Out 1,24 : Return
  38.   350 *Enter'today
  39.   360   @ : Input"Enter the date in mo/da/yr format. ",Command$
  40.   370   If Command$="" Then Return
  41.   380   If Len(Command$)<>8 Then @"Please use mo/da/yr format." : Goto 360
  42.   390   I=Val(Command$(0,1))
  43.   400   If I<1 Or I>12 Then @"Then month must be between 01 and 12." : Goto 360
  44.   410   I=Val(Command$(3,4))
  45.   420   If I<1 Or I>31 Then @"The day must be between 01 and 31." : Goto 360
  46.   430   I=Val(Command$(6,7))
  47.   440   If I=0 And Command$(6,7)<>"00" Then @"The year must be a number." : Goto 360
  48.   450   If(Command$(2,2)<>"/") Or(Command$(5,5)<>"/") Then @"You must separate the date with /'s." : Goto 360
  49.   460   Today$=Command$(0,1)+Command$(3,4)+Command$(6,7)
  50.   470   Return
  51.   480 *Change'date
  52.   490   @ : @
  53.   500   Gosub Enter'today
  54.   510   Open\1,6\Edit'file$
  55.   520   Put\1,0\Today$(-1)
  56.   530   Close\1\
  57.   540   Goto Menu
  58.   550 *Create'file
  59.   560   If Sys(3)<>134 Then Goto Error'report
  60.   570   Create Edit'file$
  61.   580   Open\1,6\Edit'file$
  62.   590   Put\1,1\Today$(-1)
  63.   600   Close\1\
  64.   610   Retry
  65.   620 *Error'report
  66.   630   @ : @"Error ";Sys(3);" has occured."
  67.   640   Stop
  68.   650   @""
  69.