Example #1
0
        protected internal static ScalarValue CreateValue(long value_Renamed)
        {
            if (Util.IsBiggerThanInt(value_Renamed))
            {
                return(new LongValue(value_Renamed));
            }

            return(new IntegerValue((int)value_Renamed));
        }
Example #2
0
        public override ScalarValue GetVal(string value_Renamed)
        {
            long longValue;

            try
            {
                longValue = Int64.Parse(value_Renamed);
            }
            catch (FormatException)
            {
                Global.HandleError(Error.FastConstants.S3_INITIAL_VALUE_INCOMP, "The value \"" + value_Renamed + "\" is not compatable with type " + this);
                return(null);
            }
            if (Util.IsBiggerThanInt(longValue))
            {
                return(new LongValue(longValue));
            }
            return(new IntegerValue((int)longValue));
        }