Page 1 of 1

New feature: Array of objects

PostPosted: Oct 14, 2005 @ 4:38pm
by kornalius

PostPosted: Oct 14, 2005 @ 6:06pm
by mmtbb

PostPosted: Oct 29, 2005 @ 12:10am
by mmtbb
Normally when you access a property of an object it is like this:

Object.property$ = "hello";

however, in the above examples, an array is like this:

Object$[i$].Property$ = 23; //notice all the '$' signs. Shouldn't it be:

Object[i$].property$;

Perhaps you specifically wanted it this way, in which case that is fine, it is just nice to have the format the same for consistancy in the syntax.

PostPosted: Oct 29, 2005 @ 4:23pm
by kornalius
Yep it's this way. obj$[i$].property$

PPL get the offset of the variable obj$ at position i$, then get the property$ variable value. It's not conventional but is with PPL anyway! :wink:

PostPosted: Oct 29, 2005 @ 5:53pm
by mmtbb
thanks

PostPosted: Oct 30, 2005 @ 5:01am
by mmtbb
when you free the object array, can you do:

freeobject(ObjectArray$);

or do you have to free each array element?:

freeobject(ObjectArray$[i$]);

PostPosted: Oct 31, 2005 @ 2:22am
by kornalius