コード例 #1
0
 /// <inheritdoc />
 public override void VisitLongintValue(LongintValue value)
 {
     if (isIncrement)
     {
         if (value.Value < long.MaxValue)
         {
             result = OutSet.CreateLong(value.Value + 1);
         }
         else
         {
             result = OutSet.CreateDouble(TypeConversion.ToFloat(value.Value) + 1.0);
         }
     }
     else
     {
         if (value.Value > long.MinValue)
         {
             result = OutSet.CreateLong(value.Value - 1);
         }
         else
         {
             result = OutSet.CreateDouble(TypeConversion.ToFloat(value.Value) - 1.0);
         }
     }
 }
コード例 #2
0
        /// <inheritdoc />
        public override void VisitLongintValue(LongintValue value)
        {
            IntegerValue integerValue;

            if (TypeConversion.TryConvertToInteger(OutSet, value, out integerValue))
            {
                integerIndex = integerValue;
            }
            else
            {
                integerIndex = null;
            }

            base.VisitLongintValue(value);
        }
コード例 #3
0
        /// <inheritdoc />
        public override void VisitLongintValue(LongintValue value)
        {
            switch (operation)
            {
            case Operations.Plus:
                result = value;
                break;

            case Operations.Minus:
                // Result of arithmetic negation can overflow
                if ((value.Value == 0) || ((-value.Value) != 0))
                {
                    result = OutSet.CreateLong(-value.Value);
                }
                else
                {
                    // <seealso cref="UnaryOperationEvaluator.VisitIntegerValue" />
                    result = OutSet.CreateDouble(-(TypeConversion.ToFloat(value.Value)));
                }
                break;

            case Operations.BitNegation:
                result = OutSet.CreateLong(~value.Value);
                break;

            case Operations.Int32Cast:
                IntegerValue convertedValue;
                if (TypeConversion.TryConvertToInteger(OutSet, value, out convertedValue))
                {
                    result = convertedValue;
                }
                else
                {
                    result = OutSet.AnyIntegerValue;
                }
                break;

            case Operations.FloatCast:
            case Operations.DoubleCast:
                result = TypeConversion.ToFloat(Snapshot, value);
                break;

            default:
                base.VisitLongintValue(value);
                break;
            }
        }
コード例 #4
0
 /// <inheritdoc />
 /// <exception cref="System.NotSupportedException">Thrown always</exception>
 public override void VisitLongintValue(LongintValue value)
 {
     throw new NotSupportedException("Long integer is not currently supported");
 }
コード例 #5
0
 /// <inheritdoc />
 public override void VisitLongintValue(LongintValue value)
 {
     Result = snapshot.CreateDouble(value.Value);
 }
コード例 #6
0
 /// <inheritdoc />
 public override void VisitLongintValue(LongintValue value)
 {
     containsLong = true;
     minLong      = Math.Min(minLong, value.Value);
     maxLong      = Math.Max(maxLong, value.Value);
 }
コード例 #7
0
 /// <inheritdoc />
 public override void VisitLongintValue(LongintValue value)
 {
     result = value.Value.ToString();
 }
コード例 #8
0
 /// <inheritdoc />
 public override void VisitLongintValue(LongintValue value)
 {
     numberFound();
 }
コード例 #9
0
 /// <inheritdoc />
 public override void VisitLongintValue(LongintValue value)
 {
     result         = TypeConversion.ToString(OutSet, value);
     abstractResult = null;
 }
コード例 #10
0
 /// <inheritdoc />
 public override void VisitLongintValue(LongintValue value)
 {
     Max = Math.Max(Max, value.Value);
 }