Get the value on top of the Lua API stack
This is the most basic operation to retrieve a value. It is also most flexible in the sense, that it does not matter how the value actually gets on top of the stack by previous Lua operations.
The interface looks like this:
call aot_top_get_val(val, errCode, L, default)
.
See for example aot_top_get_real for a more detailed description of the
parameters.
aot_top_get_val can not be in the same generic interface as the other aot_get_val routines, as it results in ambiguities of the interfaces.
Note
The retrieved value will be popped from the Lua API stack.
Interpret topmost entry on Lua stack as a single precision real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=single_k), | intent(out) | :: | val |
Value of the Variable in the script |
||
integer, | intent(out) | :: | ErrCode |
Error code to indicate what kind of problem might have occured. |
||
type(flu_State) | :: | L |
Handle to the Lua script |
|||
real(kind=single_k), | intent(in), | optional | :: | default |
Some default value, that should be used, if the variable is not set in the Lua script. |
Interpret topmost entry on Lua stack as a double precision real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=double_k), | intent(out) | :: | val |
Value of the Variable in the script |
||
integer, | intent(out) | :: | ErrCode |
Error code to indicate what kind of problem might have occured. |
||
type(flu_State) | :: | L |
Handle to the Lua script |
|||
real(kind=double_k), | intent(in), | optional | :: | default |
Some default value, that should be used, if the variable is not set in the Lua script. |
Interpret topmost entry on Lua stack as a default integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int_k), | intent(out) | :: | val |
Value of the Variable in the script |
||
integer, | intent(out) | :: | ErrCode |
Error code to indicate what kind of problem might have occured. |
||
type(flu_State) | :: | L |
Handle to the Lua script |
|||
integer(kind=int_k), | intent(in), | optional | :: | default |
Some default value, that should be used, if the variable is not set in the Lua script. |
Interpret topmost entry on Lua stack as a single precision real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=long_k), | intent(out) | :: | val |
Value of the Variable in the script |
||
integer, | intent(out) | :: | ErrCode |
Error code to indicate what kind of problem might have occured. |
||
type(flu_State) | :: | L |
Handle to the Lua script |
|||
integer(kind=long_k), | intent(in), | optional | :: | default |
Some default value, that should be used, if the variable is not set in the Lua script. |
Interpret topmost entry on Lua stack as a single precision real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | val |
Value of the Variable in the script |
|||
integer, | intent(out) | :: | ErrCode |
Error code to indicate what kind of problem might have occured. |
||
type(flu_State) | :: | L |
Handle to the Lua script |
|||
character(len=*), | intent(in), | optional | :: | default |
Some default value, that should be used, if the variable is not set in the Lua script. |
Interpret topmost entry on Lua stack as a single precision real.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(out) | :: | val |
Value of the Variable in the script |
||
integer, | intent(out) | :: | ErrCode |
Error code to indicate what kind of problem might have occured. |
||
type(flu_State) | :: | L |
Handle to the Lua script |
|||
logical, | intent(in), | optional | :: | default |
Some default value, that should be used, if the variable is not set in the Lua script. |
Interpret topmost entry on Lua stack as userdata.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | intent(out) | :: | val |
Value of the Variable in the script |
||
integer, | intent(out) | :: | ErrCode |
Error code to indicate what kind of problem might have occured. |
||
type(flu_State) | :: | L |
Handle to the Lua script |
|||
type(c_ptr), | intent(in), | optional | :: | default |
Some default value, that should be used, if the variable is not set in the Lua script. |