aot_table_module Module

This module provides some convenient functions to act on Lua tables.


Uses

  • module~~aot_table_module~~UsesGraph module~aot_table_module aot_table_module module~aot_quadruple_table_module aot_quadruple_table_module module~aot_table_module->module~aot_quadruple_table_module module~aot_err_module aot_err_module module~aot_table_module->module~aot_err_module module~aot_extdouble_table_module aot_extdouble_table_module module~aot_table_module->module~aot_extdouble_table_module module~flu_binding flu_binding module~aot_table_module->module~flu_binding module~flu_kinds_module flu_kinds_module module~aot_table_module->module~flu_kinds_module module~aot_top_module aot_top_module module~aot_table_module->module~aot_top_module module~aot_table_ops_module aot_table_ops_module module~aot_table_module->module~aot_table_ops_module module~aot_quadruple_table_module->module~aot_err_module module~aot_quadruple_table_module->module~flu_binding module~aot_quadruple_table_module->module~flu_kinds_module module~aot_quadruple_table_module->module~aot_top_module module~aot_quadruple_table_module->module~aot_table_ops_module module~aot_quadruple_top_module aot_quadruple_top_module module~aot_quadruple_table_module->module~aot_quadruple_top_module module~aot_err_module->module~flu_binding module~aot_extdouble_table_module->module~aot_err_module module~aot_extdouble_table_module->module~flu_binding module~aot_extdouble_table_module->module~flu_kinds_module module~aot_extdouble_table_module->module~aot_top_module module~aot_extdouble_table_module->module~aot_table_ops_module module~aot_extdouble_top_module aot_extdouble_top_module module~aot_extdouble_table_module->module~aot_extdouble_top_module module~flu_binding->module~flu_kinds_module module~lua_fif lua_fif module~flu_binding->module~lua_fif iso_c_binding iso_c_binding module~flu_binding->iso_c_binding module~lua_parameters lua_parameters module~flu_binding->module~lua_parameters module~dump_lua_fif_module dump_lua_fif_module module~flu_binding->module~dump_lua_fif_module module~aot_top_module->module~aot_err_module module~aot_top_module->module~flu_binding module~aot_top_module->module~flu_kinds_module module~aot_top_module->module~aot_quadruple_top_module module~aot_top_module->module~aot_extdouble_top_module module~aot_table_ops_module->module~flu_binding module~aot_table_ops_module->module~flu_kinds_module module~aot_table_ops_module->module~aot_top_module module~aot_quadruple_top_module->module~aot_err_module module~aot_quadruple_top_module->module~flu_binding module~lua_fif->iso_c_binding module~lua_fif->module~lua_parameters module~lua_parameters->iso_c_binding module~aot_extdouble_top_module->module~aot_err_module module~aot_extdouble_top_module->module~flu_binding module~dump_lua_fif_module->iso_c_binding

Used by

  • module~~aot_table_module~~UsedByGraph module~aot_table_module aot_table_module module~aot_extdouble_fun_module aot_extdouble_fun_module module~aot_extdouble_fun_module->module~aot_table_module module~aot_fun_module aot_fun_module module~aot_fun_module->module~aot_table_module module~aot_fun_module->module~aot_extdouble_fun_module module~aot_quadruple_fun_module aot_quadruple_fun_module module~aot_fun_module->module~aot_quadruple_fun_module module~aot_quadruple_fun_module->module~aot_table_module module~aotus_module aotus_module module~aotus_module->module~aot_table_module module~aot_path_module aot_path_module module~aot_path_module->module~aot_table_module module~aot_path_module->module~aot_fun_module module~aot_path_module->module~aotus_module

Contents


Interfaces

public interface aot_table_get_val

Get a value from a table.

First, the given key is looked up, if this fails, the value at the given position is looked up, and if this also fails, the default value is returned. Positional addressing is only valid, as long, as no value was provided by an explicit key in the list before the entry in question.

  • private subroutine get_table_real(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a single precision real value from a table.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=single_k), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_double(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a double precision real value from a table.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=double_k), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_integer(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a default integer value from a table.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int_k), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_long(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a long integer value from a table.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=long_k), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_string(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a string from a table.

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_logical(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a logical value from a table.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    logical, intent(in), optional :: default

    Some default value, that should be used, if the variable is not set in the Lua script.

  • private subroutine get_table_userdata(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a userdata value (generic C pointer) from a table.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    type(c_ptr), intent(in), optional :: default

    Some default value, that should be used, if the variable is not set in the Lua script.

public interface aot_table_set_val

Set a value in a table.

The given value will be put at the entry named by key into the table provided in thandle. Alternatively, you can also put the value by position into the table by providing the pos argument. If both, pos and key are provided, the key will be used. Though, both of them are optional, at least one of them has to be provided.

  • private subroutine set_table_real(val, L, thandle, key, pos)

    Put a single precision real value into a table.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=single_k), intent(in) :: val

    Value of the table entry if it exists.

    type(flu_State) :: L

    Handle to the Lua script.

    integer, intent(in) :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
  • private subroutine set_table_double(val, L, thandle, key, pos)

    Put a double precision real value into a table.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=double_k), intent(in) :: val

    Value of the table entry if it exists.

    type(flu_State) :: L

    Handle to the Lua script.

    integer, intent(in) :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
  • private subroutine set_table_integer(val, L, thandle, key, pos)

    Put a default integer value into a table.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int_k), intent(in) :: val

    Value of the table entry if it exists.

    type(flu_State) :: L

    Handle to the Lua script.

    integer, intent(in) :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
  • private subroutine set_table_long(val, L, thandle, key, pos)

    Put a long integer value into a table.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=long_k), intent(in) :: val

    Value of the table entry if it exists.

    type(flu_State) :: L

    Handle to the Lua script.

    integer, intent(in) :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
  • private subroutine set_table_string(val, L, thandle, key, pos)

    Put a string value into a table.

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: val

    Value to set in the table.

    type(flu_State) :: L

    Handle to the Lua script.

    integer, intent(in) :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to set.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to set in the table.

    Read more…
  • private subroutine set_table_logical(val, L, thandle, key, pos)

    Put a logical value into a table.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: val

    Value to set in the table.

    type(flu_State) :: L

    Handle to the Lua script.

    integer, intent(in) :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to set.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to set in the table.

    Read more…
  • private subroutine set_table_userdata(val, L, thandle, key, pos)

    Put user-data pointer into a table.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(in) :: val

    Pointer to set in the table.

    type(flu_State) :: L

    Handle to the Lua script.

    integer, intent(in) :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to set.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to set in the table.

    Read more…

public interface aot_get_val

Get a value from the Lua script.

This is the central interface to retrieve values from a Lua script, its general shape looks like call aot_{top}_get_val(<outputs>, <id>, default). Where the "outputs" are val and errCode. While "id" is at least the Lua context L. For global variables there has to be a key to identify the variable.

The errCode returns an error code with various bits set for different errors that might happen while retrieving the variable. They can be checked by btest and the different error codes are:

For example a check for a fatal error can be done by btest(errCode, aoterr_fatal).

For the access to global variables in the Lua script the interface therefore, looks like: call aot_get_val(val, errCode, L, key, default).

The interface to access table values looks like: call aot_get_val(val, errCode, L, thandle, key, pos, default). Position pos and key are both optional, but one of them has to be provided. If both are provided the key takes precedence over the pos, and the pos will only be tried if the access to the key fails. See for example get_table_real for a more detailed description of the parameters.

  • private subroutine get_table_real(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a single precision real value from a table.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=single_k), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_double(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a double precision real value from a table.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=double_k), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_integer(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a default integer value from a table.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int_k), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_long(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a long integer value from a table.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=long_k), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_string(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a string from a table.

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    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 get_table_logical(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a logical value from a table.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    logical, intent(in), optional :: default

    Some default value, that should be used, if the variable is not set in the Lua script.

  • private subroutine get_table_userdata(val, ErrCode, L, thandle, key, pos, default)

    Retrieve a userdata value (generic C pointer) from a table.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(out) :: val

    Value of the table entry if it exists.

    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, intent(in), optional :: thandle

    Handle to the table to look the value up in.

    character(len=*), intent(in), optional :: key

    Name of the entry to look for.

    Read more…
    integer, intent(in), optional :: pos

    Position of the entry to look for in the table.

    Read more…
    type(c_ptr), intent(in), optional :: default

    Some default value, that should be used, if the variable is not set in the Lua script.

public interface aot_table_from_1Darray

This interface enables the simple creation of uniform one dimensional arrays as tables in the Lua context.

It takes an one dimensional array of values and returns a thandle to identify the newly generated table.

  • private subroutine create_1Darray_real(L, thandle, val)

    This subroutine takes a one dimensional array, and puts it as a table into the Lua context.

    The returned thandle provides the index to access this newly created table.

    Arguments

    Type IntentOptional Attributes Name
    type(flu_State) :: L

    Handle to the Lua script.

    integer, intent(out) :: thandle

    Handle to access the newly created table.

    real(kind=single_k), intent(in) :: val(:)

    Values to put into the new table.

  • private subroutine create_1Darray_double(L, thandle, val)

    This subroutine takes a one dimensional array, and puts it as a table into the Lua context.

    The returned thandle provides the index to access this newly created table.

    Arguments

    Type IntentOptional Attributes Name
    type(flu_State) :: L
    integer, intent(out) :: thandle

    Handle to access the newly created table.

    real(kind=double_k), intent(in) :: val(:)

    Values to put into the new table.


Functions

public function aot_exists(L, thandle, key, pos) result(exists)

Returns wether a given entity exists in the Lua script L.

Read more…

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: L

Handle to the Lua script.

integer, intent(in), optional :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…

Return Value logical


Subroutines

public subroutine aot_table_set_top(L, thandle, key, pos)

Put the top of the stack into a table.

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: L

Handle to the Lua script.

integer, intent(in) :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…

private subroutine get_table_real(val, ErrCode, L, thandle, key, pos, default)

Retrieve a single precision real value from a table.

Arguments

Type IntentOptional Attributes Name
real(kind=single_k), intent(out) :: val

Value of the table entry if it exists.

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, intent(in), optional :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…
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 get_table_double(val, ErrCode, L, thandle, key, pos, default)

Retrieve a double precision real value from a table.

Arguments

Type IntentOptional Attributes Name
real(kind=double_k), intent(out) :: val

Value of the table entry if it exists.

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, intent(in), optional :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…
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 get_table_integer(val, ErrCode, L, thandle, key, pos, default)

Retrieve a default integer value from a table.

Arguments

Type IntentOptional Attributes Name
integer(kind=int_k), intent(out) :: val

Value of the table entry if it exists.

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, intent(in), optional :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…
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 get_table_long(val, ErrCode, L, thandle, key, pos, default)

Retrieve a long integer value from a table.

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(out) :: val

Value of the table entry if it exists.

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, intent(in), optional :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…
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 get_table_logical(val, ErrCode, L, thandle, key, pos, default)

Retrieve a logical value from a table.

Arguments

Type IntentOptional Attributes Name
logical, intent(out) :: val

Value of the table entry if it exists.

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, intent(in), optional :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…
logical, intent(in), optional :: default

Some default value, that should be used, if the variable is not set in the Lua script.

private subroutine get_table_userdata(val, ErrCode, L, thandle, key, pos, default)

Retrieve a userdata value (generic C pointer) from a table.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(out) :: val

Value of the table entry if it exists.

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, intent(in), optional :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…
type(c_ptr), intent(in), optional :: default

Some default value, that should be used, if the variable is not set in the Lua script.

private subroutine get_table_string(val, ErrCode, L, thandle, key, pos, default)

Retrieve a string from a table.

Arguments

Type IntentOptional Attributes Name
character(len=*) :: val

Value of the table entry if it exists.

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, intent(in), optional :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…
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 set_table_real(val, L, thandle, key, pos)

Put a single precision real value into a table.

Arguments

Type IntentOptional Attributes Name
real(kind=single_k), intent(in) :: val

Value of the table entry if it exists.

type(flu_State) :: L

Handle to the Lua script.

integer, intent(in) :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…

private subroutine set_table_double(val, L, thandle, key, pos)

Put a double precision real value into a table.

Arguments

Type IntentOptional Attributes Name
real(kind=double_k), intent(in) :: val

Value of the table entry if it exists.

type(flu_State) :: L

Handle to the Lua script.

integer, intent(in) :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…

private subroutine set_table_integer(val, L, thandle, key, pos)

Put a default integer value into a table.

Arguments

Type IntentOptional Attributes Name
integer(kind=int_k), intent(in) :: val

Value of the table entry if it exists.

type(flu_State) :: L

Handle to the Lua script.

integer, intent(in) :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…

private subroutine set_table_long(val, L, thandle, key, pos)

Put a long integer value into a table.

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(in) :: val

Value of the table entry if it exists.

type(flu_State) :: L

Handle to the Lua script.

integer, intent(in) :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to look for.

Read more…
integer, intent(in), optional :: pos

Position of the entry to look for in the table.

Read more…

private subroutine set_table_logical(val, L, thandle, key, pos)

Put a logical value into a table.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: val

Value to set in the table.

type(flu_State) :: L

Handle to the Lua script.

integer, intent(in) :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to set.

Read more…
integer, intent(in), optional :: pos

Position of the entry to set in the table.

Read more…

private subroutine set_table_string(val, L, thandle, key, pos)

Put a string value into a table.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: val

Value to set in the table.

type(flu_State) :: L

Handle to the Lua script.

integer, intent(in) :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to set.

Read more…
integer, intent(in), optional :: pos

Position of the entry to set in the table.

Read more…

private subroutine set_table_userdata(val, L, thandle, key, pos)

Put user-data pointer into a table.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in) :: val

Pointer to set in the table.

type(flu_State) :: L

Handle to the Lua script.

integer, intent(in) :: thandle

Handle to the table to look the value up in.

character(len=*), intent(in), optional :: key

Name of the entry to set.

Read more…
integer, intent(in), optional :: pos

Position of the entry to set in the table.

Read more…

private subroutine create_1Darray_real(L, thandle, val)

This subroutine takes a one dimensional array, and puts it as a table into the Lua context.

Read more…

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: L

Handle to the Lua script.

integer, intent(out) :: thandle

Handle to access the newly created table.

real(kind=single_k), intent(in) :: val(:)

Values to put into the new table.

private subroutine create_1Darray_double(L, thandle, val)

This subroutine takes a one dimensional array, and puts it as a table into the Lua context.

Read more…

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: L
integer, intent(out) :: thandle

Handle to access the newly created table.

real(kind=double_k), intent(in) :: val(:)

Values to put into the new table.