File.Copy ("blank.txt","temp.txt")
var stream,stream2,lastnumber :int
var username, password, answer:string
%Gets the username and password from the user
%Enters the information into a tempory file
loop
put "Username: "..
get username
put "Password: "..
get password
cls
open : stream,"temp.txt",put
put : stream, username, " "
put : stream, password, " "
close : stream
% Confirms the user's name and password
put "<-Cofirm->"
put "Username: "..
put username(1)
put "Password: "..
put password(1)
put "(Y/N)"
get answer
exit when answer="y"
cls
end loop
% Opens the data file, gets all previous entries
open : stream, "data.txt", get
get : stream, lastnumber
var words:array 1..lastnumber of string
for i : 1 .. lastnumber
get : stream, words (i):*
close : stream
open : stream, "data.txt", put
put : stream, lastnumber + 1, " "..
put : stream, username, " "..
put : stream, password
put : stream, lastnumber, " "..
put : stream, words (i)
close : stream
end for
|