some help

i am making a program where the user can add some information about a student, and then it wil save the info, and the user can then add some more info later,and it will save the info...if anyone can help me here is the info that i need to get

first name
last name
rank
le class
and then all saves em in an array, then saves the array into a file like...open "save1.sav" for output as #1

Comments

  • : i am making a program where the user can add some information about a student, and then it wil save the info, and the user can then add some more info later,and it will save the info...if anyone can help me here is the info that i need to get
    :
    : first name
    : last name
    : rank
    : le class
    : and then all saves em in an array, then saves the array into a file like...open "save1.sav" for output as #1
    :

    Mr (I don't know your name),
    You don't have to use arrays for this purpose. Simply open a file in append mode, get the information from the user and then write them on the file. When you open a file in append mode, the previous data remains on your file, its just like adding some extra. Like this...

    start:
    open "a",#1,"Save1.sav"
    input "Please, type first name: ",firstname$
    input "Please, type lastname: ",lastname$
    input "Enter the rank: ",rank
    input "Enter class: ",class
    write #1, firstname$, lastname$, rank, class
    close #1
    input "Any more data (Y/N) ";ans$
    if ans$="Y" or ans$="y" then goto start
    if ans$="N" or ans$="n" then end
    end


    This should solve your problem.
    Modify this source as per your needs.
    You can contact me for further justifications at [email protected]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion