
-----------------------------------
hskhan
Mon Jun 16, 2003 5:01 pm

Records
-----------------------------------
How would i create / input / output data into a record?

-----------------------------------
PaddyLong
Mon Jun 16, 2003 5:03 pm


-----------------------------------
here is a very simple one that demonstrates what I think you are asking


var person :
    record
        name : string
        age : int
    end record

person.name := "Paddy"
person.age := 17

put person.name, " is ", person.age, " years old"


-----------------------------------
Andy
Mon Jun 16, 2003 5:14 pm


-----------------------------------
ya you could also create an artifical type like that
type data:
    record 
        name : string 
        age : int 
    end record

-----------------------------------
Andy
Mon Jun 16, 2003 5:14 pm


-----------------------------------
whoa paddylong, you indent even on compsci.ca?

-----------------------------------
hskhan
Mon Jun 16, 2003 5:21 pm


-----------------------------------
I need a record, and text file combo that checks if a record exists before. how can i check if the record has been added to the text file? Could you please help. Thanks.
So far I have : 


type playerRec :
    record
        User : string (5)
        PlayerScore : int
    end record
var rplayer : playerRec

var name : string
put "Name" ..
get name
var getname : string := ""
loop
    if length (name) 