PDA

View Full Version : Array of Arrays



mirosh82
09-06-2006, 02:02 PM
Hello,

I am trying to create an array of arrays and can't figure out how to do it with PV-WAVE.

I do not know the size of the array or the arrays within the array before run-time.

I hope this is enough information to get some help.

Thanks,
Mike

allan
09-07-2006, 09:16 AM
arrays of arrays are represented as lists of arrays:
a=listarr(m,dblarr(n))
if the dimensions are not available as passed parameters
then the variable can be created in an execute statement:
s = execute( 'a=listarr(m,dblarr(n))' )

donb
09-07-2006, 10:32 AM
As an add-on to Allan's comments, when you create variables on the fly within a PV-WAVE routine using the EXECUTE command, you might have to add a ..LOCAL command to the routine. Check out the "Executive Commands" description in the PV-WAVE Help for details.

mirosh82
09-08-2006, 09:17 AM
Thanks Guys, I ended up not having to use the array of arrays, but this information is nice to know anyway!

-Mike