Ichar

Integer code for character.

声明

语法

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

参数

Argument Name

Argument Description

arg

expression argument

type

table entry type

value

value of expression

返回值

The return value is the expression that the Ichar represents.

描述

Ichar represents integer code for character.

类型

Only accepts characters.

示例

integer :: i
i = ichar(' ')

ASR:

(TranslationUnit
    (SymbolTable
        1
        {
            i:
                (Variable
                    1
                    i
                    Local
                    ()
                    ()
                    Default
                    (Integer 4 [])
                    Source
                    Public
                    Required
                    .false.
                )

        })
    [(=
        (Var 1 i)
        (Ichar
            (StringConstant
                " "
                (Character 1 1 () [])
            )
            (Integer 4 [])
            (IntegerConstant 32 (Integer 4 []))
        )
        ()
    )]
)

也可以看看