This gets messy:
Code: Select all
datasection
data.s "White" : data.i $ffffff
data.s "Black" : data.i 0
enddatasection
Code: Select all
datasection.i
data $ffffff , "White"
data 0, "Black"
enddatasection
Code: Select all
datasection
data.s "White" : data.i $ffffff
data.s "Black" : data.i 0
enddatasection
Code: Select all
datasection.i
data $ffffff , "White"
data 0, "Black"
enddatasection
Code: Select all
data 0
Code: Select all
Structure foo
x.i
y.s
z.f
EndStructure
Restore test
Define t.foo
Read.foo t
test:
DataSection
Data.foo 1, "Hi", 3.1415
EndDataSection
Whatever your Default type was. In my example, I used .i.STARGÅTE wrote:and what isbyte, acsii, word, unicode, long, quad, float, double ???Code: Select all
data 0
I'd be happy with that!KJ67 wrote:I'd prefer the data, read etc. keywords to support structures. Would be more PB-style.Code: Select all
Structure foo x.i y.s z.f EndStructure Restore test Define t.foo Read.foo t test: DataSection Data.foo 1, "Hi", 3.1415 EndDataSection
Me too! +1Tenaja wrote:I'd be happy with that!KJ67 wrote:I'd prefer the data, read etc. keywords to support structures. Would be more PB-style.Code: Select all
Structure foo x.i y.s z.f EndStructure Restore test Define t.foo Read.foo t test: DataSection Data.foo 1, "Hi", 3.1415 EndDataSection
Previous thread covering the same/similar subject: http://www.purebasic.fr/english/viewtopic.php?f=3&t=40966KJ67 wrote:I'd prefer the data, read etc. keywords to support structures. Would be more PB-style.Code: Select all
Structure foo x.i y.s z.f EndStructure Restore test Define t.foo Read.foo t test: DataSection Data.foo 1, "Hi", 3.1415 EndDataSection