protected static Ptg calcOct2Dec( Ptg[] operands )
	{
		if( operands.length < 1 )
		{
			return new PtgErr( PtgErr.ERROR_NULL );
		}
		debugOperands( operands, "OCT2DEC" );
		long l = (long) operands[0].getDoubleVal(); // avoid sci notation
		String oString = String.valueOf( l ).trim();
		// 10 digits at most (=30 bits)
		if( oString.length() > 10 )
		{
			return new PtgErr( PtgErr.ERROR_NUM );
		}
		long dec;
		try
		{
			dec = Long.parseLong( oString, 8 );
			// must det. manually if binary string is negative because parseInt/parseLong does not
			// handle two's complement input!!!
			if( dec >= 536870912L )        // 2^29 (= 30 bits, signed)
			{
				dec -= 1073741824L;        // 2^30 (= 31 bits, signed)
			}
		}
		catch( Exception e )
		{
			return new PtgErr( PtgErr.ERROR_NUM );
		}
		PtgNumber pnum = new PtgNumber( dec );
		log.debug( "Result from OCT2DEC= " + pnum.getVal() );
		return pnum;
	}