RealUnaryMinus

Floating point unary minus operator as the second operand of binary arithmetic operators, a expr node.

Declaración

Sintaxis

RealUnaryMinus(expr arg, ttype type, expr? value)

Argumentos

Argument Name

Argument Description

arg

expression arguments

type

table entry type

value

expression value

Valores devueltos

The return value is the expression that the RealUnaryMinus represents.

Descripción

RealUnaryMinus represents real unary minus operand of binary arithmetic operators, to be used without parantheses.

Example : a = b.x * -c.x

Tipos

Only accepts floating point values, exponents.

Ejemplos

-1.2

ASR:

(TranslationUnit
    (SymbolTable
        1
        {

        })
    [(RealUnaryMinus
        (RealConstant
            1.200000
            (Real 4 [])
        )
        (Real 4 [])
        (RealConstant
            -1.200000
            (Real 4 [])
        )
    )]
)

Ver también

IntegerUnaryMinus