public type myrec
x as long
y as long
s as string*4
end type
dim a as myrec
RecordLen=len(a)
NewFileNum=freefile
Open NewFileName For Random As #NewFileNum Len = RecordLen
get #NewFileNum,3,a
a.x=5
a.y=10
a.s="good"
put #NewFileNum,3,a
close #NewFileNum