Structures

Just starting out? Need help? Post your questions and find answers here.
Fantoma
New User
New User
Posts: 6
Joined: Sun Jul 06, 2003 5:04 am
Location: Australia
Contact:

Structures

Post by Fantoma »

I'm guessing this code should work but I'll let the more experienced of you tell me that I did some simple little thing wrong.... :)

Code: Select all

Structure secondstruct_
  name.s
EndStructure

Structure test_
  array.secondstruct_[4]
  primitive.l
EndStructure

test.test_
test\array[0]\name = "Hello"
test\primitive = 0

; This works
workaround.l = test\primitive
output.s = test\array[workaround]\name

; This does not
output.s = test\array[test\primitive]\name
result : '' 'name' offset not found in this structure ''


I'm guessing it is getting baffled by the number of \'s in the line but I think it should work.

Finally - Hello to all on the board! I hope eventually I can offer some help to someone else once I develop some degree of skill, but don't hold your breath :)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Hello Fantoma, welcome :). Thanks for this one, I will take a closer look tonight.
Post Reply