Inference/src/CodeGeneration/Operations/CGRuntimeCheckArgumentOperation.cs
/// <summary>
/// Checks if the Double Type parameter passed (operand) matches with the proper argument.
/// It makes to 3calls to CGRuntimeCheckTypeExpressionOperation operation. One using a CharType object, second
/// with IntType object, and last usint a double type, all of them trying a convert to double (toDouble parameter = true)
/// </summary>
/// <param name="operand">DoubleType parameter to check</param>
/// <returns></returns>
Checks if the Double Type parameter passed (operand) matches with the proper argument.
It makes to 3calls to CGRuntimeCheckTypeExpressionOperation operation. One using a CharType object, second
with IntType object, and last usint a double type, all of them trying a convert to double (toDouble parameter = true)
Checks if the Double Type parameter passed ( operand ) matches with the proper argument . It makes to 3calls to CGRuntimeCheckTypeExpressionOperation operation . One using a CharType object second with IntType object and last usint a double type all of them trying a convert to double ( toDouble parameter = true )
public override object Exec(DoubleType operand, object arg) {
            string nextArgument = this.codeGenerator.NewLabel;
            CharType.Instance.AcceptOperation(new CGRuntimeCheckTypeExpressionOperation<T>(this.indent, this.codeGenerator, nextArgument, true), arg);
            IntType.Instance.AcceptOperation(new CGRuntimeCheckTypeExpressionOperation<T>(this.indent, this.codeGenerator, nextArgument, true), arg);
            DoubleType.Instance.AcceptOperation(new CGRuntimeCheckTypeExpressionOperation<T>(this.indent, this.codeGenerator, nextArgument, true), arg);
            nextMethod.Add(this.codeGenerator.NewLabel);
            this.codeGenerator.br(this.indent, this.nextMethod[this.nextMethod.Count - 1]);
            this.codeGenerator.WriteLabel(this.indent, nextArgument);
            return null;
        }
public override object Exec ( DoubleType operand , object arg ) { string nextArgument = this . codeGenerator . NewLabel ; CharType . Instance . AcceptOperation ( new CGRuntimeCheckTypeExpressionOperation < T > ( this . indent , this . codeGenerator , nextArgument , true ) , arg ) ; IntType . Instance . AcceptOperation ( new CGRuntimeCheckTypeExpressionOperation < T > ( this . indent , this . codeGenerator , nextArgument , true ) , arg ) ; DoubleType . Instance . AcceptOperation ( new CGRuntimeCheckTypeExpressionOperation < T > ( this . indent , this . codeGenerator , nextArgument , true ) , arg ) ; nextMethod . Add ( this . codeGenerator . NewLabel ) ; this . codeGenerator . br ( this . indent , this . nextMethod [ this . nextMethod . Count - 1 ] ) ; this . codeGenerator . WriteLabel ( this . indent , nextArgument ) ; return null ; }
Checks if the Double Type parameter passed (operand) matches with the proper argument.
Checks if the Double Type parameter passed ( operand ) matches with the proper argument .
None
operand
DoubleType
DoubleType parameter to check
DoubleType parameter to check
arg
object