home *** CD-ROM | disk | FTP | other *** search
- 'MODFREQ.BAS
- 'Compile as .TBC file
- '871103-1
-
- defdbl a - z
-
- cls
- color 0,7
- PRINT" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
- PRINT" = =
- PRINT" = Modify FREQS.ORB Entries =
- PRINT" = =
- PRINT" = 11/03/1987 =
- PRINT" = =
- PRINT" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
- PRINT
- PRINT"Existing entries will be presented for possible modification, followed"
- print"by blank entry(s) to allow you to add to the list of satellite beacon "
- print"frequencies; the frequency specified can be any you wish to track. It"
- print"does not have to be strictly a beacon. Make certain you enter the "
- print"satellite's CATALOG number accurately.. the record is keyed on it. "
- color 7,0
- print
-
- open "FREQS.TMP" for OUTPUT as #2 'open output file
- open "FREQS.ORB" for INPUT as #1 'prepare to read file
-
- while not EOF(1)
- input# 1, s$, cat, f1, f2 'read record
- gosub recdisplay 'display the record
-
- y5 = csrlin 'save csrlin for query
- color 0,7
- print"Accept, Delete, Modify this entry (A/d/m): ";
- resp$ = input$ (1)
- if resp$ = chr$(13) then resp$ = "A"
- resp$ = ucase$(resp$)
- print resp$
- color 7,0
- if resp$ = "M" then gosub update 'go update the record
- if resp$ = "D" then nowrite 'skip this record
- writerec:
- write# 2, s$, cat, f1, f2
- nowrite:
- locate y1,1
- for i = y1 to 23 'clear bottom of screen
- print" "
- next i
- locate y1,1
- WEND
-
- close# 1
-
- blankbot:
- locate y1,1
- for i = y1 to 23 'clear bottom of screen
- print" "
- next i
- locate y1,1
- gosub displaymt
-
- y5 = csrlin 'save csrlin for query
- color 0,7
- print" Make an entry (y/N): ";
- resp$ = input$ (1)
- if resp$ = chr$(13) then resp$ = "N"
- resp$ = ucase$(resp$)
- print resp$
- color 7,0
- if resp$ = "Y" then gosub update else alldone 'go load the record
- write# 2, s$, cat, f1, f2
- goto blankbot 'go get next one
-
- alldone:
- print" "
- color 0,7
- print " Updates complete.."
- color 7,0
- close# 2
-
- kill "FREQS.ORB"
- name "FREQS.TMP" as "FREQS.ORB"
-
- RUN "ORBS.EXE" 'EXIT to menu program
-
- '= = = = = = = = = = = = = = = = = = = =
-
- update:
- up0:
- locate y1, x1
- line input;resp$
- if len(resp$) = 0 then up1
- print" "
- s$ = resp$
- up1:
- locate y2, x2
- line input;resp$
- if len(resp$) = 0 then up2
- print" "
- cat = val(resp$)
- up2:
- locate y3, x3
- line input;resp$
- if len(resp$) = 0 then up3
- print" "
- f1 = val(resp$)
- up3:
- locate y4, x4
- line input;resp$
- if len(resp$) = 0 then up4
- print" "
- f2 = val(resp$)
-
- up4:
- locate y5
- print " "
- locate y5
- color 0,7
- print " Is data correct (Y/n): ";
- resp$ = input$ (1)
- if resp$ = chr$(13) then resp$ = "Y"
- resp$ = ucase$(resp$)
- print resp$
- color 7,0
- if resp$ = "N" then up0 'Try update again
-
- RETURN 'RETURN to write record
-
- '= = = = = = = = = = = = = = = = = = = = = = = =
-
- recdisplay:
- print "Satellite name: ";
- x1 = pos(1)
- y1 = csrlin 'save cursor position
- print s$
-
- print "Catalog number: ";
- x2 = pos(1)
- y2 = csrlin
- print cat
-
- print " Frequency 1: ";
- x3 = pos(1)
- y3 = csrlin
- print using "####.###";f1
-
- print " Frequency 2: ";
- x4 = pos(1)
- y4 = csrlin
- print using "####.###";f2
-
- print
- RETURN
-
- '= = = = = = = = = = = = = = = = = = = = = = = =
-
- displaymt:
- print "Satellite name: ";
- x1 = pos(1)
- y1 = csrlin 'save cursor position
- print
-
- print "Catalog number: ";
- x2 = pos(1)
- y2 = csrlin
- print
-
- print " Frequency 1: ";
- x3 = pos(1)
- y3 = csrlin
- print
-
- print " Frequency 2: ";
- x4 = pos(1)
- y4 = csrlin
- print
-
- print
- RETURN