On Jul 19, 2005, at 1:57 PM, Steele, Josh wrote:

I'm trying to initialize an array using something like this

Offset = new int[]{A,B,C}

where A, B, C have already been set in the interpreter instance. I seem to be able to eval the above statement fine, but I can't seem to find a way to get the array back out from the interpreter - get() only returns Objects, not arrays.  Also, when I try to get Offset[0], it returns null, even though I know A has been set to a value.

Is there something I'm missing?  Can bean

You should be able to do one of two things:

either get the whole array (which is itself an Object)

  int [] myArray = (int [])interpreter.get( Offset );

or eval() the index operation:

  Integer element0 = (Integer)interpreter.eval( "Offset[0]" );



Pat