示例#1
0
 public static NeoNumber Reify(double value)
 {
     if (value % 1 == 0)
     {
         return(NeoInt.ValueOf((int)value));
     }
     else
     {
         return(NeoFloat.ValueOf(value));
     }
 }
示例#2
0
        public override NeoValue Length()
        {
            var mm = GetMetaMethod("__length");

            if (mm != null)
            {
                return(mm.Call(new [] { this }));
            }
            else
            {
                return(NeoInt.ValueOf(data.Count));
            }
        }
示例#3
0
 public override NeoValue Length() => NeoInt.ValueOf(data.Count);
示例#4
0
 public override NeoValue BitXor(NeoValue other)
 {
     return(NeoInt.ValueOf(AsInt ^ other.CheckNumber().AsInt));
 }
示例#5
0
 public override NeoValue BitNot()
 {
     return(NeoInt.ValueOf(~AsInt));
 }
示例#6
0
 public override NeoValue Rsh(NeoValue other)
 {
     return(NeoInt.ValueOf(AsInt >> other.CheckNumber().AsInt));
 }
示例#7
0
 public override NeoValue Length() => NeoInt.ValueOf(Scope.LocalCount);