aot_top_get_val Interface

public interface aot_top_get_val

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.

Calls

interface~~aot_top_get_val~9~~CallsGraph interface~aot_top_get_val~9 aot_top_get_val proc~aot_top_get_double aot_top_get_double interface~aot_top_get_val~9->proc~aot_top_get_double proc~aot_top_get_integer aot_top_get_integer interface~aot_top_get_val~9->proc~aot_top_get_integer proc~aot_top_get_logical aot_top_get_logical interface~aot_top_get_val~9->proc~aot_top_get_logical proc~aot_top_get_long aot_top_get_long interface~aot_top_get_val~9->proc~aot_top_get_long proc~aot_top_get_real aot_top_get_real interface~aot_top_get_val~9->proc~aot_top_get_real proc~aot_top_get_string aot_top_get_string interface~aot_top_get_val~9->proc~aot_top_get_string proc~aot_top_get_userdata aot_top_get_userdata interface~aot_top_get_val~9->proc~aot_top_get_userdata proc~flu_isnoneornil flu_isNoneOrNil proc~aot_top_get_double->proc~flu_isnoneornil proc~flu_isnumber flu_isnumber proc~aot_top_get_double->proc~flu_isnumber proc~flu_pop flu_pop proc~aot_top_get_double->proc~flu_pop proc~flu_todouble flu_todouble proc~aot_top_get_double->proc~flu_todouble proc~aot_top_get_integer->proc~flu_isnoneornil proc~aot_top_get_integer->proc~flu_isnumber proc~aot_top_get_integer->proc~flu_pop proc~aot_top_get_integer->proc~flu_todouble proc~flu_isboolean flu_isBoolean proc~aot_top_get_logical->proc~flu_isboolean proc~aot_top_get_logical->proc~flu_isnoneornil proc~aot_top_get_logical->proc~flu_pop proc~flu_toboolean flu_toBoolean proc~aot_top_get_logical->proc~flu_toboolean proc~aot_top_get_long->proc~flu_isnoneornil proc~aot_top_get_long->proc~flu_isnumber proc~aot_top_get_long->proc~flu_pop proc~aot_top_get_long->proc~flu_todouble proc~aot_top_get_real->proc~flu_isnoneornil proc~aot_top_get_real->proc~flu_isnumber proc~aot_top_get_real->proc~flu_pop proc~flu_tonumber flu_tonumber proc~aot_top_get_real->proc~flu_tonumber proc~aot_top_get_string->proc~flu_isnoneornil proc~flu_isstring flu_isString proc~aot_top_get_string->proc~flu_isstring proc~aot_top_get_string->proc~flu_pop proc~flu_tolstring flu_tolstring proc~aot_top_get_string->proc~flu_tolstring proc~flu_islightuserdata flu_islightuserdata proc~aot_top_get_userdata->proc~flu_islightuserdata proc~aot_top_get_userdata->proc~flu_isnoneornil proc~aot_top_get_userdata->proc~flu_pop proc~flu_touserdata flu_touserdata proc~aot_top_get_userdata->proc~flu_touserdata interface~lua_type lua_type proc~flu_isboolean->interface~lua_type proc~flu_islightuserdata->interface~lua_type proc~flu_isnoneornil->interface~lua_type interface~lua_isnumber lua_isNumber proc~flu_isnumber->interface~lua_isnumber interface~lua_isstring lua_isString proc~flu_isstring->interface~lua_isstring interface~lua_settop lua_settop proc~flu_pop->interface~lua_settop interface~lua_toboolean lua_toboolean proc~flu_toboolean->interface~lua_toboolean interface~lua_tonumberx lua_tonumberx proc~flu_todouble->interface~lua_tonumberx interface~lua_tolstring lua_tolstring proc~flu_tolstring->interface~lua_tolstring proc~flu_tonumber->interface~lua_tonumberx interface~lua_touserdata lua_touserdata proc~flu_touserdata->interface~lua_touserdata

Module Procedures

private subroutine aot_top_get_real(val, ErrCode, L, default)

Interpret topmost entry on Lua stack as a single precision real.

Arguments

Type IntentOptional 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.

private subroutine aot_top_get_double(val, ErrCode, L, default)

Interpret topmost entry on Lua stack as a double precision real.

Arguments

Type IntentOptional 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.

private subroutine aot_top_get_integer(val, ErrCode, L, default)

Interpret topmost entry on Lua stack as a default integer.

Arguments

Type IntentOptional 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.

private subroutine aot_top_get_long(val, ErrCode, L, default)

Interpret topmost entry on Lua stack as a single precision real.

Arguments

Type IntentOptional 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.

private subroutine aot_top_get_string(val, ErrCode, L, default)

Interpret topmost entry on Lua stack as a single precision real.

Arguments

Type IntentOptional 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.

private subroutine aot_top_get_logical(val, ErrCode, L, default)

Interpret topmost entry on Lua stack as a single precision real.

Arguments

Type IntentOptional 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.

private subroutine aot_top_get_userdata(val, ErrCode, L, default)

Interpret topmost entry on Lua stack as userdata.

Arguments

Type IntentOptional 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.