07-26-2003, 08:58 AM
i made this program to calcualte the pay total per day for my work but it still dosnt save and load files correctly. can someone help me with that? well here is the code:
Quote:Screen 13
Cls
Print ""
Print ""
Print " Detassel Pay 1.0"
Print " By: Alex Briner"
Print " (Made for the "
Print " S&J Detasseling company)"
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print ""
Print " CopyRight 2003 By:"
Print " EveWare and Alex briner"
PSet (10, 10), 1
DRAW "r295 d170 l295 u170"
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
Cls
Print " Main Menu"
Print ""
Print ""
Print ""
Print ""
Print "----------------------------------"
Print "| 1.Load | 2.New | 3.Edit | 4.Help"
Print "----------------------------------"
Print "Note: choose number"
INPUT "What is your choice?", choice%
If choice% = 1 Then GoTo Load
IF choice% = 2 THEN GOTO New
If choice% = 3 Then GoTo Edit
If choice% = 4 Then GoTo Help
Load:
Cls
Print "Loading Account........."
Print ""
Print ""
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
New:
Cls
Print "Accout Creator"
Print ""
Print ""
Print ""
INPUT "How Many Hours did you work?", hours%
Print "5.15 per hour times"; hours%; "equals"; 5.15 * hours%
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
Cls
Print "day 1 -"; 5.15 * hours%
Open "detassel.sav" For Output As #1
Print #1, detassel$
Edit:
Cls
Open "detassel.sav" For Input As #1
Input #1, detassel$
Print "account loaded"
INPUT "What is the day number of work?", daynum%
INPUT "How many hours were worked?", hrs%
Print "ok...."
While INKEY$ <> "": Wend
While INKEY$ = "": Wend
Cls
Print detassel$
Print daynum% - 5.15 * hrs%
Print ""
Print ""
Print "saving info..."
Open "detassel.sav" For Output As #1
Print #1, detassel$
Help:
Cls
Print "Detasseling money calculator by Alex Briner"