Reading a line from a file and comparing.
Posted: Sat Jun 17, 2017 3:44 pm
I'm working on an operating environment in QuickBasic 4.5.
I need help loading saving and loading from a line of code in a file like example.sys for a password system.
Here's what I have the code as so far:
After reboot:
Basically, how would I store a value onto a file and be able to access it later?
I need help loading saving and loading from a line of code in a file like example.sys for a password system.
Here's what I have the code as so far:
Code: Select all
...
SETPASS:
CLS
INPUT "Enter Password you want to set: ",setpass$
INPUT "Confirm: ",confirmpass$
IF confirmpass$ = setpass$ THEN password$ = setpass$ ELSE PRINT "Passwords not identical!":SLEEP 2:GOTO SETPASS
(Code that saves line of code to file)
...
Code: Select all
PASSWORD:
CLS
(Code that sets the value of password$ from a specific line of code.)
INPUT "Enter Password: ",passinput$
IF passinput$ = password$ THEN GOTO DESKTOP ELSE PRINT "Wrong Password!":SLEEP 3:GOTO PASSWORD