public function aot_type_of(L, thandle, key, pos) result(luatype)
Get the Lua object in table thandle under the given key or pos on the
top of the stack and return the Lua type of the gotten entry.
This might be used to get a Lua entry to the top of the stack without
knowing its type beforehand, and then deciding what to load, based on
the type.
Lua types are encoded as integer values and available in the
flu_binding module.
FLU_TNONE : not existing
FLU_TNIL : not available
FLU_TBOOLEAN : logical value
FLU_TNUMBER : a number
FLU_TSTRING : a string
FLU_TTABLE : a table
FLU_TFUNCTION: a function
If none of key, pos or thandle are provided, the type of the current
top of the stack will be returned. Just passing pos without a thandle
is invalid and always returns FLU_TNONE.
Arguments
Type
Intent
Optional
Attributes
Name
type(flu_State)
::
L
Handle to the Lua script.
integer,
intent(in),
optional
::
thandle
Handle of the table to get the value from
character(len=*),
intent(in),
optional
::
key
Key of the value to find the type for.
integer,
intent(in),
optional
::
pos
Position of the value to find the type for.
Return Value integer
Type of the Lua object found in L, thandle, key and pos
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.