Ejemplo n.º 1
0
        public override AObject Neq(AObject other)
        {
            if (other is AString)
            {
                return new ABoolean(Value != (other as AString).Value);
            }

            return base.Neq(other);
        }
Ejemplo n.º 2
0
        public override AObject Ladd(AObject other)
        {
            if (other is ABoolean)
            {
                return new ABoolean(Value || (other as ABoolean).Value);
            }

            return base.Ladd(other);
        }
Ejemplo n.º 3
0
        public override AObject Lmul(AObject other)
        {
            if (other is ABoolean)
            {
                return new ABoolean(Value && (other as ABoolean).Value);
            }

            return base.Lmul(other);
        }
Ejemplo n.º 4
0
        public override AObject Ge(AObject other)
        {
            if (other is AInteger)
            {
                return new ABoolean(Value >= (other as AInteger).Value);
            }

            return base.Ge(other);
        }
Ejemplo n.º 5
0
        public override AObject Eq(AObject other)
        {
            if (other is ABoolean)
            {
                return new ABoolean(Value == (other as ABoolean).Value);
            }

            return base.Eq(other);
        }
Ejemplo n.º 6
0
        public override AObject Div(AObject other)
        {
            if (other is AInteger)
            {
                return new AInteger(Value / (other as AInteger).Value);
            }

            return base.Div(other);
        }
Ejemplo n.º 7
0
        public override AObject Add(AObject other)
        {
            if (other is AInteger)
            {
                return new AInteger(Value + (other as AInteger).Value);
            }

            return base.Add(other);
        }
Ejemplo n.º 8
0
 public override void Assign(AObject other)
 {
     if (other is AString)
     {
         Value = (other as AString).Value;
     }
     else
     {
         throw new InvalidTypeException();
     }
 }
Ejemplo n.º 9
0
        public override AObject Add(AObject other)
        {
            if (other is AString)
            {
                return new AString(Value + (other as AString).Value);
            }

            if (other is AInteger)
            {
                return new AString(Value + (other as AInteger).Value.ToString());
            }

            return base.Add(other);
        }
Ejemplo n.º 10
0
 public virtual AObject Sub(AObject other)
 {
     throw new NotDefinedOperationException();
 }
Ejemplo n.º 11
0
 public abstract void Assign(AObject other);
Ejemplo n.º 12
0
        public override AObject Sub(AObject other)
        {
            if (other is AInteger)
            {
                return new AInteger(Value - (other as AInteger).Value);
            }

            return base.Sub(other);
        }
Ejemplo n.º 13
0
        public override AObject Mul(AObject other)
        {
            if (other is AInteger)
            {
                return new AInteger(Value * (other as AInteger).Value);
            }

            return base.Mul(other);
        }
Ejemplo n.º 14
0
        public override AObject Lt(AObject other)
        {
            if (other is AInteger)
            {
                return new ABoolean(Value < (other as AInteger).Value);
            }

            return base.Lt(other);
        }