ArrayBound¶
Array upper and lower bound.
Declaración¶
Sintaxis¶
ArrayBound(expr v, expr? dim, ttype type, arraybound bound,
expr? value)
Argumentos¶
Argument Name |
Argument Description |
---|---|
|
expresión |
|
dimension |
|
table entry type |
|
array bound |
|
expression value |
Valores devueltos¶
The return value is the expression that the ArrayBound represents.
Descripción¶
ArrayBound represents bounds of array. It can be upper or lower bound.
Tipos¶
Only accepts integers.
Ejemplos¶
integer :: a(2:5, 3:9, 7)
print *, lbound(a, 1), lbound(a, 2), lbound(a, 3)
ASR:
(TranslationUnit
(SymbolTable
1
{
a:
(Variable
1
a
Local
()
()
Default
(Integer 4 [((IntegerConstant 2 (Integer 4 []))
(IntegerConstant 4 (Integer 4 [])))
((IntegerConstant 3 (Integer 4 []))
(IntegerConstant 7 (Integer 4 [])))
((IntegerConstant 1 (Integer 4 []))
(IntegerConstant 7 (Integer 4 [])))])
Source
Public
Required
.false.
)
})
[(Print
()
[(ArrayBound
(Var 1 a)
(IntegerConstant 1 (Integer 4 []))
(Integer 4 [])
LBound
()
)
(ArrayBound
(Var 1 a)
(IntegerConstant 2 (Integer 4 []))
(Integer 4 [])
LBound
()
)
(ArrayBound
(Var 1 a)
(IntegerConstant 3 (Integer 4 []))
(Integer 4 [])
LBound
()
)]
()
()
)]
)