06-22-2004, 01:21 AM
look at the code, i cant get the program to save the inpout so it is still there after you exit the program.
anything would be nice
Code:
top:
CLS
PRINT "DATABASE"
PRINT " "
PRINT "1) Enter name and adress into database"
PRINT "2) View database"
PRINT "3) Exit"
PRINT " "
PRINT " "
INPUT "What would you like to do"; mmchc$
IF mmchc$ = "1" THEN GOTO enterbase:
IF mmchc$ = "2" THEN GOTO viewbase
IF mmchc$ = "3" THEN END
enterbase:
TYPE people
nm AS STRING * 40
age AS INTEGER
address AS STRING * 60
END TYPE
DIM person AS people
OPEN "fileprog.dat" FOR RANDOM AS #1 LEN = LEN(person)
INPUT "Record"; record
INPUT "Name: "; person.nm
INPUT "Age"; person.age
INPUT "Address:"; person.address
PUT 1, record, person
CLOSE
GOTO top
viewbase:
CLS
INPUT "View which record"; record
GET 1, record, person
PRINT "Name: "; person.nm
PRINT "Age: "; person.age
PRINT "Address: "; person.address
CLOSE
END
anything would be nice
unning a panasonic toughbook, cf-25