Array Handling Difficulties
william chan
Posts: 1,326
Help!
I tried doing
VAR
long mydata[noparse][[/noparse]20]
index := 1
third := 3
mydata[noparse][[/noparse]index].byte[noparse][[/noparse]third] := 100
but the compiler keeps complaining "variable needs a parameter"....
What gives?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
I tried doing
VAR
long mydata[noparse][[/noparse]20]
index := 1
third := 3
mydata[noparse][[/noparse]index].byte[noparse][[/noparse]third] := 100
but the compiler keeps complaining "variable needs a parameter"....
What gives?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Comments
This is most unusual.
Thanks for your help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
I can't disagree. A subscripted variable should still produce a typed "lvalue" on the compile stack that's subject to further modification. It's probably not a bug in the compiler, but more likely just an oversight.
-Phil