Page 1 of 1

Structures

Posted: Mon Jul 07, 2003 9:16 am
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 :)

Posted: Mon Jul 07, 2003 10:42 am
by Fred
Hello Fantoma, welcome :). Thanks for this one, I will take a closer look tonight.