Random access file variable length
I'm creating a random access file. When counting the different variables to get the length of the file, how much should I enter for a date variable?
name as string * 20
address as string * 30
arrivaldate as date
dim g as guest
The name and address is simple but how much should I reserve for the date variable?
Re: Random access file variable length
You are using a Type so you can simply get the length of the type
a date data type is 8 bytes if I'm not mistaken
Open Filename for Random as #1 len=Len(g)