home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Set of Apple II Hard Drive Images
/
eric.hdv
/
DIET2
/
ADDFOOD.BAS
next >
Wrap
BASIC Source File
|
2020-08-13
|
1KB
|
38 lines
5 D$ = CHR$(4)
7 F$ = "FOODLIST.TXT"
10 PRINT D$"OPEN "F$
100 HOME : PRINT "*** ADD FOOD ***": PRINT
105 Q = FRE(0)
110 INPUT "FOOD CODE:";FC$
120 INPUT "FOOD DESC:";FD$
130 INPUT "PORTION:";PO$
140 INPUT "CALORIES:";CA
150 INPUT "FAT CALORIES:";FC
160 INPUT "TOTAL FAT GRAMS:";FA
170 INPUT "SATURATED FAT GRAMS:";SF
180 INPUT "CHOLESTEROL MG:";CH
190 INPUT "SODIUM MG:";SO
200 INPUT "TOTAL CARB GRAMS:";CB
210 INPUT "DIETARY FIBER:";FI
220 INPUT "SUGARS:";SU
230 INPUT "PROTEIN (GRAMS):";PR
240 PRINT
250 PRINT "YOU ENTERED: FOOD CODE:"FC$
255 PRINT "----------------------------------------";
260 PRINT PO$;" "FD$;" HAS "CA" CALORIES": PRINT FC" CALORIES FROM COME FROM FAT."
270 PRINT FA" GRAMS FAT, "SF" GRAMS SATURATED FAT"
280 PRINT CH" MG CHOLESTEROL, "SO" MG SODIUM"
290 PRINT CB" G CARBOHYDRATES ("FI" FIBER "SU" SUGAR)": PRINT "AND "PR" G PROTEIN"
295 PRINT
300 INPUT "IS THIS CORRECT? (Y/N):";YN$
310 IF LEFT$(YN$,1) < >"Y" THEN 100
320 PRINT D$"APPEND "F$
325 PRINT D$"WRITE "F$
330 PRINT FC$","FD$","PO$","CA","FC","FA","SF","CH","SO","CB","FI","SU","PR
340 PRINT D$
350 INPUT "ADD MORE FOODS? (Y/N):";YN$
360 IF LEFT$(YN$,1) = "Y" THEN 100
370 PRINT D$"CLOSE "F$
380 INPUT "RUN FOOD DIARY NOW? (Y/N):";YN$
390 IF LEFT$(YN$,1) = "Y" THEN PRINT D$"RUN DIARY.BAS"
400 END