protected static Ptg calcMid( Ptg[] operands )
	{
		String s = String.valueOf( operands[0].getValue() );
		if( (s == null) || s.equals( "" ) )
		{
			return new PtgStr( "" );    //  Don't error out if "" ala Excel
		}
		if( (operands[1] instanceof PtgErr) || (operands[2] instanceof PtgErr) )
		{
			return new PtgErr( PtgErr.ERROR_VALUE );
		}
		int start = operands[1].getIntVal() - 1;
		int len = operands[2].getIntVal();
		if( len < 0 )
		{
			len = start + len;
		}
		if( s.length() < start )
		{
			return new PtgStr( "" );
		}
		if( start == -1 )
		{
			return new PtgErr( PtgErr.ERROR_VALUE );
		}
		s = s.substring( start );
		if( len > s.length() )
		{
			return new PtgStr( s );
		}
		s = s.substring( 0, len );
		return new PtgStr( s );
	}