>>>>  So is it possible to create such a table? I tried to initialise table
>>>>  using code above but got an error message Parameter number out of Range


I suspect the answer is no you can't - see later caveat.

You can of course do this sort of thing, because it is based upon 
numbers and that is all a parameter can hold

/o<200>  sub/

/     (msg, In 200-sub)/

/o<200>  endsub/

/o<201>  sub/

/     (msg, In 201-sub)/

/o<201>  endsub/

/#<_index>  = 0/

/o<while1>  sub/

/     o100 while [#<_index>  LT 2]/

/         o[200 + #<_index>  ] call/

/         #<_index>  = [#<_index>  + 1]/

/     o100 endwhile/

/o<while1>  endsub/

/o<while1>  call/

/M2/


Whilst #<param> will access the value held in that parameter and 
#[#<param>] will access the value in the parameter which has the number 
held in this parameter,
I don't think there is any way of passing the address of a subroutine 
(equivalent to &#<param> in psuedo C notation).

I have wondered however if the g-code processor does not actually 
convert named parameters and subs into numbered ones internally and 
whether those can be accessed.

Then they could be indexed in a simple array.

In the absence of text manipulation and substitution routines in gcode, 
the easiest route is just to number the subs and find an easy way of 
remembering what they do, if you want to set up an array of them which 
can be addressed.

regards



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to