aUCBLogo Demos and Tests / teststruct
to teststruct
stype=[
[i int]
[i16 int16]
[i8 int8]
[ui8 uint8]
[f float]
[c complex]
[ia intarray 3]
[i16a int16array 5]
]
s=struct stype
s'i=1234
s'i16=2345
s'i8=127
s'ui8=255
s'f=1.234
s'c=1+2i
s'ia=intarray {1 2 3}
s'i16a=int16array {1 2 3 4 5}
pr s
pr s'i8
pr sizeof s
pr count s
a=Int16Array 256
setWriter a
typeBin s
setWriter []
setReader a
r=readStructBin stype
setReader []
pr a
pr r
end