protected static Ptg calcChoose( Ptg[] operands )
	{
		if( operands.length < 2 )
		{
			return new PtgErr( PtgErr.ERROR_VALUE );
		}
		Object o = operands[0].getValue();
		try
		{
			Double dd = new Double( o.toString() ); // this can be non-integer, so truncate it if so...
			double e = dd;
			int i = (int) e;
			if( (i > (operands.length + 1)) || (i < 1) )
			{
				return new PtgErr( PtgErr.ERROR_REF );
			}
			o = operands[i].getValue();
			Double d = (Double) o;
			return new PtgNumber( d );
		}
		catch( Exception ex )
		{
			new PtgErr( PtgErr.ERROR_VALUE );
		}
		;
		return new PtgStr( o.toString() );

	}