Struct by Index - Part 1 << Back



It turns out you can access a member of a struct by index like an array. For example:

Use UI

#COMMAND MoveStruct R "TO" R R
	Move !1 !2 !3CI!4
#ENDCOMMAND

Struct Test
	Integer hello // Item 0
	Integer world // Item 1
End_Struct

Test t

MoveStruct 47 to t 0 // Moving to t.hello
MoveStruct 53 to t 1 // Moving to t.world

Showln t.hello 
Showln t.world
InKey FieldIndex

Stay tuned for part 2.

Free Web Hosting