kornalius
10-13-2006, 02:55 PM
It is possible to store objects in linked-list offering a wide range of possibilities to your applications.</p><pre><span style="color: #0066ff">#class myclass
* public (z$);
* private (x$);</span></pre><pre><span style="color: #0066ff">* nproc create
*** x$ = args$[0];
* end;</span></pre><pre><span style="color: #0066ff">* func getx
*** return(x$);
* end;
*
* proc m
*** ShowMessage(x$ + "," + z$);
* end;</span></pre><pre></pre><pre><span style="color: #0066ff">proc main
* Local(l$, i$);</span></pre><pre></pre><pre><span style="color: #0066ff">* for(i$, 1, 5)
*** Add(l$);
*** #object myclass l$(i$);
* end;</span></pre><pre><span style="color: #0066ff">* foreach(l$)
*** l.z$ = l.getx * 2;
*** l.m;
* end;
end;</span></pre>
Just imagine the possibilities... Linked-lists are very powerful.</p>
* public (z$);
* private (x$);</span></pre><pre><span style="color: #0066ff">* nproc create
*** x$ = args$[0];
* end;</span></pre><pre><span style="color: #0066ff">* func getx
*** return(x$);
* end;
*
* proc m
*** ShowMessage(x$ + "," + z$);
* end;</span></pre><pre></pre><pre><span style="color: #0066ff">proc main
* Local(l$, i$);</span></pre><pre></pre><pre><span style="color: #0066ff">* for(i$, 1, 5)
*** Add(l$);
*** #object myclass l$(i$);
* end;</span></pre><pre><span style="color: #0066ff">* foreach(l$)
*** l.z$ = l.getx * 2;
*** l.m;
* end;
end;</span></pre>
Just imagine the possibilities... Linked-lists are very powerful.</p>