This routine obtains a vectorial quantity with fixed length from a Lua
table as a whole.
It is intented to ease the reading of vectors on the Fortran side by
capsulating the parsing of the Lua table internally.
Components which are not found are filled with the data given in
the default vector. For each component an error code will be returned
to indicate the success when reading it.
If the vector is not defined at all, all components will be indicated
as non-existent.
Components, which are neither defined in the Lua script, nor in the
default will be marked with the aoterr_Fatal flag.
Arguments
Type
Intent
Optional
Attributes
Name
logical,
intent(out)
::
val(:)
Vector read from the Lua table.
integer,
intent(out)
::
ErrCode(:)
Error code describing problems encountered in each of the components.
This array has to have the same length as val.
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.
Source Code
subroutine get_table_logical_v(val,ErrCode,L,thandle,key,&&pos,default)type(flu_State)::L!! Handle to the lua scriptinteger,intent(in),optional::thandle!! Handle of the parent table!> Vector read from the Lua table.logical,intent(out)::val(:)!> Error code describing problems encountered in each of the components.!! This array has to have the same length as val.integer,intent(out)::ErrCode(:)!> Name of the variable (vector) to read.character(len=*),intent(in),optional::key!> Position of the (vector) to read.integer,intent(in),optional::pos!> A default vector to use, if no proper definition is found.!! Components will be filled with the help of this default definition.logical,intent(in),optional::default(:)integer::toptypetoptype=aot_type_of(L=L,&&thandle=thandle,&&key=key,&&pos=pos)if(toptype/=FLU_TNONE)then call aot_top_get_val(val,ErrCode,L,default)elseErrCode=ibSet(0,aoterr_NonExistent)ErrCode=ibSet(ErrCode,aoterr_Fatal)end if end subroutine get_table_logical_v