ArraySize

Size of array.

Declaración

Sintaxis

ArraySize(expr v, expr? dim, ttype type, expr? value)

Argumentos

Argument Name

Argument Description

v

expresión

dim

expression dimension

type

table entry type

value

expression value

Valores devueltos

The return value is the expression that the ArraySize represents.

Descripción

ArraySize represents size of array.

Tipos

Only accepts integers.

Ejemplos

integer :: a(3)
integer(8) :: size_a8
size_a8 = size(a, kind=8)

ASR:

(TranslationUnit
    (SymbolTable
        1
        {
            a:
                (Variable
                    1
                    a
                    Local
                    ()
                    ()
                    Default
                    (Integer 4 [((IntegerConstant 1 (Integer 4 []))
                    (IntegerConstant 3 (Integer 4 [])))])
                    Source
                    Public
                    Required
                    .false.
                ),
            size_a8:
                (Variable
                    1
                    size_a8
                    Local
                    ()
                    ()
                    Default
                    (Integer 8 [])
                    Source
                    Public
                    Required
                    .false.
                )

        })
    [(=
        (Var 1 size_a8)
        (ArraySize
            (Var 1 a)
            ()
            (Integer 8 [])
            (IntegerConstant 3 (Integer 8 []))
        )
        ()
    )]
)

Ver también