LogicalConstant

Logical literal constant, an expr node.

声明

语法

LogicalConstant(bool value, ttype type)

参数

Argument Name

Argument Description

value

value of boolean

type

tabel entry type

返回值

The return value is the expression that the LogicalConstant represents.

描述

LogicalConstant represents logical constant, is either logical value true or false. The only logical constants are .TRUE and .FALSE. The period delimiters are necessary.

The value must be in the uses 4 bytes of storage.

类型

Only accepts TRUE or FAlSe values.

示例

.TRUE.
.FALSE.

ASR:

(TranslationUnit
    (SymbolTable
        1
        {

        })
    [(LogicalConstant
        .true.
        (Logical 4 [])
    )
    (LogicalConstant
        .false.
        (Logical 4 [])
    )]
)

也可以看看

IntegerConstant, ComplexConstant, RealConstant