home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff305a.lzh
/
SpaceLog
/
SpaceLog
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1990-01-17
|
21KB
|
794 lines
CLEAR ,95000,2000
WIDTH 80
OPTION BASE 1
DIM mission$(400,11),pt%(400),fld$(11),fldlen%(11),table$(38,3),table%(38),graph%(53,2),mon%(12),col%(2),final%(2)
fld$(1)="Mission":fld$(2)="Nation":fld$(3)="Date":fld$(4)="Site"
fld$(5)="Vehicle":fld$(6)="Weight (LBS)":fld$(7)="Period (MIN)"
fld$(8)="Perigee (MI)":fld$(9)="Apogee (MI)":fld$(10)="Inclination (DEG)"
fld$(11)="Remarks"
fldlen%(1)=19:fldlen%(2)=4:fldlen%(3)=8:fldlen%(4)=4:fldlen%(5)=14
fldlen%(6)=6:fldlen%(7)=5:fldlen%(8)=5:fldlen%(9)=5:fldlen%(10)=5
fldlen%(11)=37
mon%(1)=0:mon%(2)=31:mon%(3)=59:mon%(4)=90:mon%(5)=120:mon%(6)=151
mon%(7)=181:mon%(8)=212:mon%(9)=243:mon%(10)=273:mon%(11)=304:mon%(12)=334
col%(1)=3:col%(2)=2
SCREEN 1,640,200,2,2
WINDOW 1,"Manned Space Log 1.54 (c) 1990 by Gene Heitman",,20,1
setpalette:
black:
PALETTE 0,0.05,0.05,0.05
yellow:
PALETTE 1,0.9,0.7,0
blue:
PALETTE 2,0,0.1,1
red:
PALETTE 3,1,0.1,0
GOSUB loadfile
definemenu:
MENU 1,0,1,"Change File"
MENU 1,1,1,"Load Data"
MENU 1,2,1,"Add New Mission"
MENU 1,3,1,"Change Mission"
MENU 1,4,1,"Delete Mission"
MENU 1,5,1,"Save Changes"
MENU 2,0,1,"List Missions"
MENU 2,1,1,"All Missions"
MENU 2,2,1,"By Mission"
MENU 2,3,1,"By Nation"
MENU 2,4,1,"By Date"
MENU 2,5,1,"By Site"
MENU 2,6,1,"By Vehicle"
MENU 3,0,1,"Print Missions"
MENU 3,1,1,"All Missions"
MENU 3,2,1,"By Mission"
MENU 3,3,1,"By Nation"
MENU 3,4,1,"By Date"
MENU 3,5,1,"By Site"
MENU 3,6,1,"By Vehicle"
MENU 4,0,1,"Show Totals"
MENU 4,1,1,"Nation Table"
MENU 4,2,1,"Nation Graph"
MENU 4,3,1,"Date Table"
MENU 4,4,1,"Date Graph"
MENU 4,5,1,"Site Table"
MENU 4,6,1,"Site Graph"
MENU 4,7,1,"Site Map"
MENU 4,8,1,"Vehicle Table"
MENU 5,0,1,"Quit"
MENU 5,1,1,"Quit SpaceLog"
CLS
PRINT "Press the right mouse button and choose a menu."
WHILE count%<>0
SLEEP
ON MENU(0) GOSUB changefile,listmissions,printmissions,showtotals,quit
WEND
quit:
SYSTEM
END
changefile:
ON MENU(1) GOSUB loadfile,addnewmission,changemission,deletemission,savefile
RETURN
listmissions:
choice=MENU(1)
ON choice GOSUB listall,listby,listby,listby,listby,listby
RETURN
printmissions:
choice=MENU(1)
ON choice GOSUB printall,printby,printby,printby,printby,printby
RETURN
showtotals:
ON MENU(1) GOSUB nationtable,nationgraph,datetable,dategraph,sitetable,sitegraph,sitemap,vehicletable
RETURN
loadfile:
CLS
PRINT "Please wait while the mission data is loaded."
PRINT
PRINT "Loading mission #"
OPEN "SLMissions" FOR INPUT AS #1
count%=1
WHILE NOT EOF(1)
LOCATE 3,18
PRINT count%
FOR fld%=1 TO 11
INPUT# 1,mission$(count%,fld%)
NEXT fld%
pt%(count%)=count%
count%=count%+1
WEND
CLOSE #1
count%=count%-1
PRINT
PRINT "Return to the menu."
RETURN
addnewmission:
CLS
IF count%=400 THEN
PRINT "The SLMissions data file is full."
ELSE
count%=count%+1
pt%(count%)=count%
PRINT "Add new mission #";count%
PRINT
FOR var%=1 TO 11
PRINT "What is the new ";fld$(var%);
INPUT mission$(count%,var%)
mission$(count%,var%)=UCASE$(mission$(count%,var%))
IF LEN(mission$(count%,var%))>fldlen%(var%) THEN
mission$(count%,var%)=LEFT$(mission$(count%,var%),fldlen%(var%))
PRINT "The field is too long. It is truncated to";fldlen%(var%);"characters."
END IF
NEXT var%
num1%=count%
GOSUB checknation
GOSUB checkdate
count$=RIGHT$(mission$(count%,3),2)+LEFT$(mission$(count%,3),2)+MID$(mission$(count%,3),4,2)
var%=1
comp$=""
WHILE (count$>=comp$) AND (var%<=count%-1)
comp$=RIGHT$(mission$(pt%(var%),3),2)+LEFT$(mission$(pt%(var%),3),2)+MID$(mission$(pt%(var%),3),4,2)
IF (count$<comp$) THEN
FOR var3%=count% TO var%+1 STEP -1
pt%(var3%)=pt%(var3%-1)
NEXT var3%
pt%(var%)=count%
END IF
var%=var%+1
WEND
END IF
PRINT
PRINT "Return to the menu."
RETURN
changemission:
CLS
getnumber:
PRINT "Change what mission # ( 1 -";count%;")";
INPUT num%
IF num%<1 OR num%>count% THEN getnumber
change$="Y"
change:
WHILE (change$="Y")
CLS
GOSUB listdata
PRINT "The fields are:"
PRINT
FOR var%=1 TO 11
PRINT var%;"- ";fld$(var%)
NEXT var%
getfield:
PRINT
INPUT "What field do you want to change ( 1 - 11 )";var2%
IF var2%<1 OR var2%>11 THEN getfield
PRINT
PRINT "The ";fld$(var2%);" is: ";mission$(pt%(num%),var2%)
PRINT "What is the new ";fld$(var2%);
INPUT mission$(pt%(num%),var2%)
mission$(pt%(num%),var2%)=UCASE$(mission$(pt%(num%),var2%))
num1%=pt%(num%)
IF var2%=2 THEN GOSUB checknation
IF var2%=3 THEN GOSUB checkdate
IF (var2%<>2) AND (var2%<>3) AND (LEN(mission$(pt%(num%),var2%))>fldlen%(var2%)) THEN
mission$(pt%(num%),var2%)=LEFT$(mission$(pt%(num%),var2%),fldlen%(var2%))
PRINT
PRINT "The field is too long. It is truncated to";fldlen%(var2%);"characters."
END IF
getchange:
PRINT
INPUT "Do you want to make more changes to this mission (Y / N)";change$
change$=UCASE$(change$)
IF change$<>"Y" AND change$<>"N" THEN getchange
WEND
PRINT
PRINT "Return to the menu."
RETURN
deletemission:
CLS
getnum:
PRINT "Delete what mission # ( 1 -";count%;")";
INPUT num%
PRINT
IF num%<1 OR num%>count% THEN getnum
GOSUB listdata
getcorrect:
INPUT "Is this the correct mission ( Y / N )";var$
var$=UCASE$(var$)
IF var$<>"Y" AND var$<>"N" THEN getcorrect
IF var$="Y" THEN mission$(pt%(num%),2)="X"
PRINT
PRINT "Return to the menu."
RETURN
savefile:
CLS
PRINT "Please wait while the mission data is saved."
PRINT
PRINT "Saving mission #"
OPEN "SLMissions" FOR OUTPUT AS #1
FOR var2%=1 TO count%
IF mission$(pt%(var2%),2)<>"X" THEN
LOCATE 3,17
PRINT var2%
FOR fld%=1 TO 11
PRINT# 1,mission$(pt%(var2%),fld%)
NEXT fld%
END IF
NEXT var2%
CLOSE #1
PRINT
PRINT "Return to the menu."
RETURN
listall:
CLS
GOSUB bounds
PRINT
PRINT "Hit the space bar to continue or the return key to quit."
PRINT
var$=""
num%=low%
WHILE (num%<=high%) AND (var$<>CHR$(13))
var$=""
IF mission$(pt%(num%),2)<>"X" THEN
GOSUB listdata
WHILE (var$<>CHR$(13)) AND (var$<>CHR$(32))
SLEEP
var$=INKEY$
WEND
END IF
num%=num% + 1
WEND
PRINT "Return to the menu."
RETURN
listby:
CLS
PRINT "What is the ";fld$(choice-1);
INPUT cp$
cp$=UCASE$(cp$)
IF LEN(cp$)>fldlen%(choice-1) THEN
cp$=LEFT$(cp$,fldlen%(choice-1))
PRINT
PRINT "The ";fld$(choice-1);" is too long. It is truncated to";fldlen%(choice-1);"characters."
END IF
PRINT
GOSUB bounds
PRINT
PRINT "Hit the space bar to continue or the return key to quit."
PRINT
var$=""
num%=low%
WHILE (num%<=high%) AND (var$<>CHR$(13))
var$=""
IF (mission$(pt%(num%),2)<>"X") AND (LEFT$(mission$(pt%(num%),choice-1),LEN(cp$))=cp$) THEN
GOSUB listdata
WHILE (var$<>CHR$(13)) AND (var$<>CHR$(32))
SLEEP
var$=INKEY$
WEND
END IF
num%=num% + 1
WEND
PRINT "Return to the menu."
RETURN
printall:
CLS
GOSUB bounds
PRINT
PRINT "Please wait while the mission data is printed to disk."
OPEN "SLPAllTop" FOR OUTPUT AS #1
PRINT# 1,SPACE$(53)+"MANNED SPACE LOG"
PRINT# 1,SPACE$(31)+"FOR ALL MAN-RELATED SPACE MISSIONS FROM "+mission$(pt%(low%),3)+" TO "+mission$(pt%(high%),3)
GOSUB printheading
CLOSE #1
PRINT
PRINT "Printing mission #"
OPEN "SLPAll" FOR OUTPUT AS #2
num%=low%
WHILE (num%<=high%)
IF mission$(pt%(num%),2)<>"X" THEN
GOSUB printdata
LOCATE 7,19
PRINT num%
END IF
num%=num% + 1
WEND
CLOSE #2
PRINT
PRINT "Return to the menu."
RETURN
printby:
CLS
PRINT "What is the ";fld$(choice-1);
INPUT cp$
cp$=UCASE$(cp$)
IF LEN(cp$)>fldlen%(choice-1) THEN
cp$=LEFT$(cp$,fldlen%(choice-1))
PRINT
PRINT "The ";fld$(choice-1);" is too long. It is truncated to";fldlen%(choice-1);"characters."
END IF
PRINT
GOSUB bounds
PRINT
PRINT "Please wait while the mission data is printed to disk."
OPEN "SLP"+LEFT$(fld$(choice-1),3)+"Top" FOR OUTPUT AS #1
PRINT# 1,SPACE$(53)+"MANNED SPACE LOG"
PRINT# 1,SPACE$(33)+"FOR MAN-RELATED SPACE MISSIONS FROM "+mission$(pt%(low%),3)+" TO "+mission$(pt%(high%),3)
var$=UCASE$(fld$(choice-1))
PRINT# 1,SPACE$(55-INT((LEN(var$)+LEN(cp$))/2))+"WITH A "+var$+" OF "+cp$
GOSUB printheading
CLOSE #1
PRINT
PRINT "Printing mission #"
OPEN "SLP"+LEFT$(fld$(choice-1),3) FOR OUTPUT AS #2
num%=low%
WHILE (num%<=high%)
IF (mission$(pt%(num%),2)<>"X") AND (LEFT$(mission$(pt%(num%),choice-1),LEN(cp$))=cp$) THEN
GOSUB printdata
LOCATE 9,19
PRINT num%
END IF
num%=num% + 1
WEND
CLOSE #2
PRINT
PRINT "Return to the menu."
RETURN
nationtable:
GOSUB computenation
CLS
PRINT " Year";TAB(10);"USSR";TAB(20);"USA";TAB(41);" Year";TAB(50);"USSR";TAB(60);"USA"
FOR var%=1 TO last% STEP 2
PRINT var%+1900+first%;TAB(9);graph%(var%,1);TAB(19);graph%(var%,2);
IF var%+1<=last% THEN PRINT TAB(41);var%+1901+first%;TAB(49);graph%(var%+1,1);TAB(59);graph%(var%+1,2)
NEXT var%
IF (last% MOD 2)<>0 THEN PRINT
PRINT
PRINT "Total";TAB(10);"USSR =";final%(1);TAB(25);"USA =";final%(2);TAB(40);"Return to the menu."
RETURN
nationgraph:
GOSUB computenation
CLS
tabpt%=(INT((last%*0.2)+0.8)*5+5)*12+40
PRINT " 24"
PRINT " "
PRINT "M ";PTAB(tabpt%);"Colors"
PRINT "i "
PRINT "s ";PTAB(tabpt%);"USSR = Red"
PRINT "s 18";PTAB(tabpt%);"USA = Blue"
PRINT "i "
PRINT "o "
PRINT "n ";PTAB(tabpt%);"Total"
PRINT "s "
PRINT " 12";PTAB(tabpt%);"USSR =";final%(1)
PRINT "P ";PTAB(tabpt%);"USA =";final%(2)
PRINT "e "
PRINT "r "
PRINT " ";PTAB(tabpt%);"Return"
PRINT "Y 6";PTAB(tabpt%);"to"
PRINT "e ";PTAB(tabpt%);"the"
PRINT "a ";PTAB(tabpt%);"menu."
PRINT "r "
PRINT " "
PRINT " 0"
FOR var4%=first%+1 TO first%+last%+5 STEP 5
PRINT PTAB((var4%-first%)*12+24);var4%;
NEXT var4%
PRINT " Year"
LINE (36,0)-((last%+1)*12+35,166),1,b
FOR var2%=1 TO last%
hor%=var2%*12+32
ver2%=INT((24-(graph%(var2%,2)))*6.66667+0.5)+3
ver1%=INT((24-(graph%(var2%,1)))*6.66667+0.5)+3
LINE (hor%,ver2%)-(hor%+4,163),col%(2),bf
LINE (hor%+6,ver1%)-(hor%+10,163),col%(1),bf
NEXT var2%
RETURN
computenation:
CLS
PRINT "Please wait while the nation totals are computed."
PRINT
FOR var%=1 TO 38
graph%(var%,1)=0
graph%(var%,2)=0
NEXT var%
final%(1)=0
final%(2)=0
first%=VAL(RIGHT$(mission$(pt%(1),3),2))-1
last%=VAL(RIGHT$(mission$(pt%(count%),3),2))-first%
PRINT "Computing mission #"
FOR var2%=1 TO count%
IF (mission$(var2%,2)<>"X") THEN
LOCATE 3,20
PRINT var2%
IF (mission$(var2%,2)="USSR") THEN var3%=1 :ELSE var3%=2
graph%(VAL(RIGHT$(mission$(var2%,3),2))-first%,var3%)=graph%(VAL(RIGHT$(mission$(var2%,3),2))-first%,var3%)+1
final%(var3%)=final%(var3%)+1
END IF
NEXT var2%
RETURN
datetable:
GOSUB computedate
CLS
PRINT " Week";TAB(7);"USSR";TAB(12);"USA";TAB(21);" Week";TAB(27);"USSR";TAB(32);"USA";TAB(41);
PRINT " Week";TAB(47);"USSR";TAB(52);"USA";TAB(61);" Week";TAB(67);"USSR";TAB(72);"USA"
FOR var%=1 TO 53 STEP 4
PRINT var%;TAB(6);graph%(var%,1);TAB(11);graph%(var%,2);
IF var%<>53 THEN
PRINT TAB(21);var%+1;TAB(26);graph%(var%+1,1);TAB(31);graph%(var%+1,2);
PRINT TAB(41);var%+2;TAB(46);graph%(var%+2,1);TAB(51);graph%(var%+2,2);
PRINT TAB(61);var%+3;TAB(66);graph%(var%+3,1);TAB(71);graph%(var%+3,2)
END IF
NEXT var%
PRINT
PRINT
PRINT "Return to the menu."
RETURN
dategraph:
GOSUB computedate
CLS
PRINT " 12"
PRINT "M ";TAB(62);"Colors"
PRINT "i "
PRINT "s ";TAB(62);"USSR = Red"
PRINT "s ";TAB(62);"USA = Blue"
PRINT "i 6"
PRINT "o ";TAB(62);"Return"
PRINT "n ";TAB(62);"to"
PRINT "s ";TAB(62);"the"
PRINT " ";TAB(62);"menu."
PRINT " 0"
FOR var4%=1 TO 53 STEP 5
PRINT TAB((var4%-1)+5);var4%;
NEXT var4%
PRINT " Week"
LINE (36,0)-(468,86),1,b
FOR var2%=2 TO 53
FOR var3%=1 TO 2
ver1%=INT((12-(graph%(var2%-1,var3%)))*6.66667+0.5)+3
ver2%=INT((12-(graph%(var2%,var3%)))*6.66667+0.5)+3
LINE ((var2%-1)*8+36,ver1%)-((var2%)*8+36,ver2%),col%(var3%)
NEXT var3%
NEXT var2%
RETURN
computedate:
CLS
PRINT "Please wait while the date totals are computed."
PRINT
FOR var%=1 TO 53
graph%(var%,1)=0
graph%(var%,2)=0
NEXT var%
PRINT "Computing mission #"
FOR var2%=1 TO count%
IF (mission$(var2%,2)<>"X") THEN
LOCATE 3,20
PRINT var2%
IF (mission$(var2%,2)="USSR") THEN var3%=1 :ELSE var3%=2
day%=mon%(VAL(LEFT$(mission$(var2%,3),2)))+VAL(MID$(mission$(var2%,3),4,2))
IF ((VAL(RIGHT$(mission$(var2%,3),2)) MOD 4)=0) AND (VAL(LEFT$(mission$(var2%,3),2))>2) THEN day%=day%+1
graph%(INT((day%-1)/7)+1,var3%)=graph%(INT((day%-1)/7)+1,var3%)+1
END IF
NEXT var2%
RETURN
sitetable:
GOSUB computesite
CLS
PRINT fld$(4);TAB(10);fld$(2);TAB(20);"#"
FOR var4%=1 TO numsit%
PRINT table$(var4%,1);TAB(10);
IF table$(var4%,2)="USSR" THEN COLOR 3,0 :ELSE COLOR 2,0
PRINT table$(var4%,2);
COLOR 1,0
PRINT TAB(19);table%(var4%)
NEXT var4%
PRINT
PRINT "Return to the menu."
RETURN
sitegraph:
GOSUB computesite
CLS
tabpt%=numsit%*5+8
PRINT " 240"
PRINT " "
PRINT "M "
PRINT "i "
PRINT "s ";TAB(tabpt%);"Colors"
PRINT "s 180"
PRINT "i ";TAB(tabpt%);"USSR = Red"
PRINT "o ";TAB(tabpt%);"USA = Blue"
PRINT "n "
PRINT "s "
PRINT " 120"
PRINT "P "
PRINT "e "
PRINT "r "
PRINT " ";TAB(tabpt%);"Return"
PRINT "S 60";TAB(tabpt%);"to"
PRINT "i ";TAB(tabpt%);"the"
PRINT "t ";TAB(tabpt%);"menu."
PRINT "e "
PRINT " "
PRINT " 0"
FOR var4%=1 TO numsit%
PRINT TAB(var4%*5+3);table$(var4%,1);
NEXT var4%
PRINT " Site"
LINE (48,0)-((numsit%+1)*40+3,166),1,b
FOR var2%=1 TO numsit%
hor%=var2%*40+16
ver%=INT((240-table%(var2%))*0.666667+0.5)+3
IF table$(var2%,2)="USSR" THEN var3%=1 :ELSE var3%=2
LINE (hor%,ver%)-(hor%+22,163),col%(var3%),bf
NEXT var2%
RETURN
computesite:
CLS
PRINT "Please wait while the site totals are computed."
PRINT
PRINT "Computing mission #"
numsit%=0
FOR var2%=1 TO count%
IF mission$(pt%(var2%),2)<>"X" THEN
LOCATE 3,20
PRINT var2%
flg%=0
var3%=1
WHILE (var3%<=numsit%) AND (flg%=0)
IF mission$(pt%(var2%),4)=table$(var3%,1) THEN
table%(var3%)=table%(var3%)+1
flg%=1
END IF
var3%=var3%+1
WEND
IF flg%=0 THEN
numsit%=numsit%+1
table$(numsit%,1)=mission$(pt%(var2%),4)
table$(numsit%,2)=mission$(pt%(var2%),2)
table%(numsit%)=1
END IF
END IF
NEXT var2%
RETURN
sitemap:
CLS
RESTORE
LINE (0,0)-(540,134),1,b
FOR lat%=-60 TO 60 STEP 30
ver%=67-lat%
LINE (0,ver%)-(540,ver%),1
NEXT lat%
FOR lon%=0 TO 300 STEP 30
hor%=INT(1.5*(30+lon%)+0.5)
LINE (hor%,0)-(hor%,134),1
NEXT lon%
WHILE lon%<>500
READ lon%,lat%
WHILE (lon%<>400) AND (lon%<>500)
lattemp%=lat%
lontemp%=lon%
READ lon%,lat%
IF lon%<>400 THEN
vertemp%=67-lattemp%
IF lontemp%<-30 THEN lontemp%=lontemp%+360
hortemp%=INT(1.5*(30+lontemp%)+0.5)
ver%=67-lat%
IF lon%<-30 THEN lon%=lon%+360
hor%=INT(1.5*(30+lon%)+0.5)
LINE (hortemp%,vertemp%)-(hor%,ver%),1
END IF
WEND
WEND
LINE (104,10)-(8,144),col%(1)
LINE (105,4)-(64,144),col%(1)
LINE (114,18)-(128,144),col%(1)
LINE (140,21)-(184,144),col%(1)
LINE (404,33)-(256,144),col%(2)
LINE (408,32)-(312,144),col%(2)
LINE (426,34)-(376,144),col%(2)
LINE (464,38)-(428,144),col%(2)
LINE (471,29)-(488,144),col%(2)
LOCATE 4,70
PRINT "Colors"
PRINT
PRINT TAB(70);"USSR = Red"
PRINT TAB(70);"USA = Blue"
LOCATE 10,70
PRINT "Return"
PRINT TAB(70);"to"
PRINT TAB(70);"the"
PRINT TAB(70);"menu."
LOCATE 19,1
PRINT "RS";TAB(8);"PL";TAB(16);"KY";TAB(23);"TT";TAB(31);"VAFB";
PRINT TAB(38);"EAFB";TAB(46);"WSMR";TAB(53);"KSC";TAB(61);"WI"
PRINT "56N";TAB(8);"63N";TAB(16);"48N";TAB(23);"46N";TAB(31);"35N";
PRINT TAB(38);"35N";TAB(46);"33N";TAB(53);"29N";TAB(61);"38N"
PRINT "39E";TAB(8);"40E";TAB(16);"46E";TAB(23);"63E";TAB(31);"121W";
PRINT TAB(38);"118W";TAB(46);"106W";TAB(53);"81W";TAB(61);"76W"
RETURN
vehicletable:
GOSUB computevehicle
CLS
PRINT fld$(5);TAB(16);fld$(2);TAB(23);"Year";TAB(28);"#";TAB(41);fld$(5);TAB(56);fld$(2);TAB(63);"Year";TAB(68);"#"
FOR var4%=1 TO numveh% STEP 2
PRINT table$(var4%,1);TAB(16);
IF table$(var4%,2)="USSR" THEN COLOR 3,0 :ELSE COLOR 2,0
PRINT table$(var4%,2);
COLOR 1,0
PRINT TAB(23);table$(var4%,3);TAB(27);table%(var4%);
IF var4%+1<=numveh% THEN
PRINT TAB(41);table$(var4%+1,1);TAB(56);
IF table$(var4%+1,2)="USSR" THEN COLOR 3,0 :ELSE COLOR 2,0
PRINT table$(var4%+1,2);
COLOR 1,0
PRINT TAB(63);table$(var4%+1,3);TAB(67);table%(var4%+1)
END IF
NEXT var4%
IF (numveh% MOD 2)<>0 THEN PRINT
PRINT
PRINT "Return to the menu."
RETURN
computevehicle:
CLS
PRINT "Please wait while the vehicle totals are computed."
PRINT
PRINT "Computing mission #"
numveh%=0
FOR var2%=1 TO count%
IF mission$(pt%(var2%),2)<>"X" THEN
LOCATE 3,20
PRINT var2%
flg%=0
var3%=1
WHILE (var3%<=numveh%) AND (flg%=0)
IF (mission$(pt%(var2%),5)=table$(var3%,1)) AND (mission$(pt%(var2%),2)=table$(var3%,2)) THEN
table%(var3%)=table%(var3%)+1
flg%=1
END IF
var3%=var3%+1
WEND
IF flg%=0 THEN
numveh%=numveh%+1
table$(numveh%,1)=mission$(pt%(var2%),5)
table$(numveh%,2)=mission$(pt%(var2%),2)
table$(numveh%,3)=RIGHT$(mission$(pt%(var2%),3),2)
table%(numveh%)=1
END IF
END IF
NEXT var2%
RETURN
checknation:
WHILE (mission$(num1%,2)<>"USSR") AND (mission$(num1%,2)<>"USA")
PRINT
PRINT "The Nation must be USA or USSR."
PRINT
PRINT "What is the new ";fld$(2);
INPUT mission$(num1%,2)
mission$(num1%,2)=UCASE$(mission$(num1%,2))
WEND
RETURN
checkdate:
WHILE (MID$(mission$(num1%,3),3,1)<>"/") OR (MID$(mission$(num1%,3),6,1)<>"/") OR (LEN(mission$(num1%,3))<>8)
PRINT
PRINT "The Date must be in MM/DD/YY format."
PRINT
PRINT "What is the new ";fld$(3);
INPUT mission$(num1%,3)
WEND
RETURN
bounds:
asklow:
PRINT "Start the list with what mission # ( 1 -";count%;")";
INPUT low%
IF low%<1 OR low%>count% THEN asklow
PRINT
askhigh:
PRINT "End the list with what mission # (";low%;"-";count%;")";
INPUT high%
IF high%<low% OR high%>count% THEN askhigh
RETURN
listdata:
PRINT "Mission #";num%
PRINT mission$(pt%(num%),1);TAB(21);
IF mission$(pt%(num%),2)="USSR" THEN COLOR 3,0 :ELSE COLOR 2,0
PRINT mission$(pt%(num%),2);
COLOR 1,0
PRINT TAB(26);mission$(pt%(num%),3);TAB(36);mission$(pt%(num%),4);
PRINT TAB(46);mission$(pt%(num%),5);TAB(66);mission$(pt%(num%),6);" LBS"
PRINT mission$(pt%(num%),7);" MIN";TAB(11);mission$(pt%(num%),8);" MI";
PRINT TAB(21);mission$(pt%(num%),9);" MI";TAB(31);mission$(pt%(num%),10);" DEG";
PRINT TAB(41);mission$(pt%(num%),11)
PRINT
RETURN
printheading:
PRINT# 1,"MISSION"+SPACE$(13)+"NAT DATE SITE VEHICLE"+SPACE$(8)+"LBS MIN MI MI DEG REMARKS"
prt$=""
FOR fld%=1 TO 11
FOR col%=1 TO fldlen%(fld%)
prt$=prt$+"-"
NEXT col%
prt$=prt$+" "
NEXT fld%
prt$=LEFT$(prt$,122)
PRINT# 1,prt$
RETURN
printdata:
prt$=""
FOR fld%=1 TO 11
prt$=prt$+mission$(pt%(num%),fld%)+SPACE$(fldlen%(fld%)+1-LEN(mission$(pt%(num%),fld%)))
NEXT fld%
prt$=LEFT$(prt$,122)
PRINT# 2,prt$
RETURN
REM Europe & Asia
DATA 13,67,10,64,5,62,5,59,11,60,12,56,16,56,19,60,18,64,25,66,21,63,21,61,29,61
DATA 28,59,24,59,20,55,11,54,10,58,8,57,8,54,5,53,-5,48,-1,46,-2,44,-9,44,-10,39,-9,37,-6,36
DATA -2,37,0,39,5,43,10,44,16,40,16,38,12,38,15,37,16,38,17,41,18,40,13,45,14,46,20,42,23,36,24,38,23,40,26,41,27,37
DATA 32,36,36,37,35,32,32,32,34,28,35,28,40,22,43,13,52,15,60,23,56,27,51,25,48,30,50,30
DATA 56,27,67,25,70,21,73,22,77,8,80,10,80,6,82,7,80,10,80,16,87,21,92,23,94,16,97,17,98,8,103,1,103,5
DATA 99,10,101,14,105,9,109,13,106,19,118,23,123,30,118,39,122,41,121,39,125,39,126,35,129,35
DATA 128,40,137,45,142,53,142,46,144,47,143,53,135,55,143,59,155,59
DATA 160,62,164,62,156,55,157,51,148,45,157,51,163,59,166,60,180,62,-178,66,-173,64,-171,67,400,0
REM White Sea
DATA 42,67,38,66,32,67,35,64,38,64,37,65,40,65,40,66,45,67,400,0
REM Black Sea
DATA 30,41,35,42,42,41,42,43,37,45,40,47,35,46,37,45,34,44,33,46,30,47,28,43,30,41,400,0
REM Caspian Sea
DATA 49,38,54,37,50,45,53,47,47,45,50,40,49,38,400,0
REM Aral Sea
DATA 58,44,61,44,62,45,62,47,59,46,58,44,400,0
REM Iceland
DATA -15,66,-25,66,-20,64,-14,65,-15,66,400,0
REM Great Britain & Ireland
DATA -3,59,2,52,-5,50,-3,55,-6,52,-10,52,-10,54,-3,55,-6,57,-3,59,400,0
REM Sardinia & Corsica
DATA 9,42,8,41,8,39,9,39,9,43,8,43,9,42,400,0
REM Africa
DATA 32,32,29,31,20,33,20,30,15,32,10,34,11,37,-2,35,-6,36,-10,33,-10,30,-13,28,-17,21,-17,15,-10,6,-7,5,9,4,8,0
DATA 14,-11,12,-18,19,-34,25,-33,36,-25,36,-20,41,-15,39,-5,45,2,51,13,43,13,37,18,32,32,400,0
REM Madagascar
DATA 49,-12,44,-16,43,-22,44,-25,47,-25,51,-14,49,-12,400,0
REM Indonesia
DATA 95,6,98,0,105,-6,107,-7,115,-8,111,-7,106,-6,106,-3,104,0,100,3,95,6,400,0
REM Borneo
DATA 109,2,110,-3,115,-4,118,1,117,7,109,2,400,0
REM Australia
DATA 115,-35,123,-34,130,-32,135,-35,138,-33,137,-35,140,-38,145,-39,150,-38
DATA 152,-33,154,-29,153,-25,146,-18,145,-15,143,-11,140,-17,135,-15
DATA 137,-12,131,-12,130,-15,127,-14,123,-16,122,-19,115,-21,113,-25,116,-32,115,-35,400,0
REM Tasmania
DATA 145,-41,147,-44,149,-41,147,-42,145,-41,400,0
REM New Zealand
DATA 173,-35,175,-37,174,-39,175,-41,172,-41,171,-43,166,-46,169,-47
DATA 171,-44,175,-41,178,-38,175,-37,400,0
REM New Guinea
DATA 131,-1,135,-5,138,-8,150,-10,137,-2,131,-1,400,0
REM Philippines
DATA 120,18,121,14,123,13,125,10,122,12,123,9,125,10,122,8,124,8,125,5,126,10,125,13,122,15,122,18,120,18,400,0
REM Japan
DATA 142,45,140,41,138,37,131,34,130,33,131,31,132,33,131,34,136,34,141,36
DATA 142,40,140,41,145,43,142,45,400,0
REM North & South America
DATA -162,67,-168,66,-161,64,-166,61,-158,58,-167,53,-178,52
DATA 173,53,-178,52,-167,53,-160,55,-154,58,-151,61,-149,61,-151,61,-151,59,-148,61,-140,60,-134,55
DATA -131,55,-128,51,-125,49,-124,41,-121,35,-118,34,-110,23,-109,24,-115,32,-113,32,-108,25
DATA -105,20,-90,13,-80,8,-80,9,-77,4,-80,1,-81,-6,-75,-15
DATA -70,-18,-72,-30,-74,-37,-75,-45,-75,-52,-70,-55,-67,-56,-65,-55,-69,-51,-66,-47,-68,-46,-62,-41,-58,-38
DATA -49,-29,-49,-26,-42,-22,-39,-13,-35,-8,-35,-5,-50,0,-52,5,-58,7
DATA -72,12,-77,9,-83,10,-83,15,-89,16,-87,22,-90,21,-92,18,-95,18,-98,22,-97,26,-97,28,-90,29,-84,30,-81,25
DATA -80,26,-82,32,-75,36,-74,41,-70,42,-70,44,-60,46,-65,47,-65,50,-57,51
DATA -59,48,-53,48,-56,54,-65,61,-68,58,-70,61,-78,62,-79,59,-80,55,-80,51,-83,55,-92,57,-95,60,-90,63
DATA -88,64,-86,66,-87,64,-85,63,-80,64,-85,66,-82,67,400,0
REM Great Lakes
DATA -76,44,-80,43,-83,42,-82,43,-81,45,-80,45,-83,46,-88,49,-92,47,-88,47,-83,46,-87,46
DATA -88,42,-88,41,-86,43,-84,46,-82,43,-83,42,-81,42,-79,43,-76,43,-76,44,400,0
REM Baffin Island
DATA -74,67,-75,65,-78,65,-78,64,-72,63,-66,62,-64,64,-68,66,-66,66,-63,65,-61,67,400,0
REM Greenland
DATA -54,67,-48,61,-43,60,-40,65,-33,67,400,0
REM Cuba
DATA -85,22,-82,23,-78,20,-74,20,-80,23,-82,23,400,0
REM Haiti
DATA -75,19,-72,18,-68,19,-70,20,-73,20,-72,19,400,0
REM Biscoe Islands
DATA -66,-67,-60,-64,-56,-64,-59,-64,-64,-67,400,0
REM Wilkes Land
DATA 87,-67,92,-66,100,-66,101,-65,109,-67,113,-65,120,-67,125,-66,128,-67,130,-66
DATA 135,-65,145,-67,400,0
DATA 500,0