RosettaCodeData/Task/Runtime-evaluation/Liberty-BASIC/runtime-evaluation-2.liberty
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

14 lines
459 B
Text

Struct myStruct, value As long, _
string As ptr
myStruct.value.struct = 10
myStruct.string.struct = "Hello World!"
structName$ = "myStruct"
numElement$ = "value"
strElement$ = "string"
Print Eval$(structName$ + "." + numElement$ + "." + "struct")
'Pay close attention that this is EVAL() because we are
'retrieving the PTR to the string which is essentially a ulong
Print Winstring(Eval(structName$ + "." + strElement$ + "." + "struct"))