Пример #1
0
        /**
         * Reads the ptg data from the array starting at the specified position
         *
         * @param data the RPN array
         * @param pos the current position in the array, excluding the ptg identifier
         * @return the number of bytes read
         */
        public int read(byte[] data, int pos)
        {
            int code = data[pos];

            error = FormulaErrorCode.getErrorCode(code);
            return(1);
        }
Пример #2
0
 /**
  * Constructor
  *
  * @param s the error constant
  */
 public ErrorConstant(string s)
 {
     error = FormulaErrorCode.getErrorCode(s);
 }
Пример #3
0
 /**
  * Constructor
  *
  * @param s the error constant
  */
 public ErrorConstant(string s)
 {
     error = FormulaErrorCode.getErrorCode(s);
 }
        /**
         * Returns the numerical value as a string
         *
         * @return The numerical value of the formula as a string
         */
        public override string getContents()
        {
            if (error == null)
                {
                error = FormulaErrorCode.getErrorCode(errorCode);
                }

            return error != FormulaErrorCode.UNKNOWN ?
              error.getDescription() : "ERROR " + errorCode;
        }
Пример #5
0
 /**
  * Reads the ptg data from the array starting at the specified position
  *
  * @param data the RPN array
  * @param pos the current position in the array, excluding the ptg identifier
  * @return the number of bytes read
  */
 public int read(byte[] data,int pos)
 {
     int code = data[pos];
     error = FormulaErrorCode.getErrorCode(code);
     return 1;
 }