LogicalBinOp

Logical Binary Operation expression type. An expr node.

Declaration

Sintaxe

LogicalBinOp(expr left, binop op, expr right, ttype type, expr? value)

Argumentos

left and right represent expression on the left and right side of operator op. type represents table entry type and value represents expression.

Valores de retorno

The return value is the expression that the LogicalBinOp represents.

Descrição

LogicalBinOp represents logical binary operation expression type. It is an ASR expr node. ASR has multiple binary expression types, for example: for Integer, real, complex, and logical.

The binary operations accept two arguments of the same type.

Tipos

Only accepts .TRUE. and .FALSE.

Exemplos

bgt(10, 4) .neqv. .true.

ASR:

(TranslationUnit
    (SymbolTable
        1
        {
            bgt:
                (ExternalSymbol
                    1
                    bgt
                    3 bgt
                    lfortran_intrinsic_bit
                    []
                    bgt
                    Private
                ),
            bgt@bgt32:
                (ExternalSymbol
                    1
                    bgt@bgt32
                    3 bgt32
                    lfortran_intrinsic_bit
                    []
                    bgt32
                    Private
                ),
            iso_fortran_env:
                (IntrinsicModule lfortran_intrinsic_iso_fortran_env),
            lfortran_intrinsic_bit:
                (IntrinsicModule lfortran_intrinsic_bit)

        })
    [(LogicalBinOp
        (FunctionCall
            1 bgt@bgt32
            1 bgt
            [((IntegerConstant 10 (Integer 4 [])))
            ((IntegerConstant 4 (Integer 4 [])))]
            (Logical 4 [])
            ()
            ()
        )
        NEqv
        (LogicalConstant
            .true.
            (Logical 4 [])
        )
        (Logical 4 [])
        ()
    )]
)

Veja Também

IntegerBinOp, ComplexBinOp, RealBinOp