aot_table_length Function

public function aot_table_length(L, thandle) result(length)

Count the entries in a lua table.

Arguments

Type IntentOptional AttributesName
type(flu_state) :: L

Handle for the Lua script.

integer, intent(in) :: thandle

Handle of the table to count the enries in.

Return Value integer

Returns the number of entries in the table.


Calls

proc~~aot_table_length~~CallsGraph proc~aot_table_length aot_table_length proc~flu_next flu_next proc~aot_table_length->proc~flu_next proc~aot_table_first aot_table_first proc~aot_table_length->proc~aot_table_first proc~flu_pop flu_pop proc~aot_table_length->proc~flu_pop interface~lua_next lua_next proc~flu_next->interface~lua_next proc~aot_table_first->proc~flu_next proc~flu_pushnil flu_pushnil proc~aot_table_first->proc~flu_pushnil interface~lua_settop lua_settop proc~flu_pop->interface~lua_settop interface~lua_pushnil lua_pushnil proc~flu_pushnil->interface~lua_pushnil

Called by

proc~~aot_table_length~~CalledByGraph proc~aot_table_length aot_table_length proc~get_top_string_vvect get_top_string_vvect proc~get_top_string_vvect->proc~aot_table_length interface~aot_top_get_val~2 aot_top_get_val proc~get_top_string_vvect->interface~aot_top_get_val~2 proc~get_top_logical_vvect get_top_logical_vvect proc~get_top_logical_vvect->proc~aot_table_length proc~get_top_logical_vvect->interface~aot_top_get_val~2 proc~get_top_integer_v get_top_integer_v proc~get_top_integer_v->proc~aot_table_length proc~get_top_integer_v->interface~aot_top_get_val~2 proc~get_top_long_v get_top_long_v proc~get_top_long_v->proc~aot_table_length proc~get_top_long_v->interface~aot_top_get_val~2 proc~get_top_double_v get_top_double_v proc~get_top_double_v->proc~aot_table_length proc~get_top_double_v->interface~aot_top_get_val~2 proc~get_top_real_vvect get_top_real_vvect proc~get_top_real_vvect->proc~aot_table_length proc~get_top_real_vvect->interface~aot_top_get_val~2 proc~get_top_string_v get_top_string_v proc~get_top_string_v->proc~aot_table_length proc~get_top_string_v->interface~aot_top_get_val~2 proc~get_top_extdouble_vvect get_top_extdouble_vvect proc~get_top_extdouble_vvect->proc~aot_table_length proc~get_top_real_v get_top_real_v proc~get_top_real_v->proc~aot_table_length proc~get_top_real_v->interface~aot_top_get_val~2 proc~get_top_logical_v get_top_logical_v proc~get_top_logical_v->proc~aot_table_length proc~get_top_logical_v->interface~aot_top_get_val~2 proc~get_top_extdouble_v get_top_extdouble_v proc~get_top_extdouble_v->proc~aot_table_length proc~get_top_integer_vvect get_top_integer_vvect proc~get_top_integer_vvect->proc~aot_table_length proc~get_top_integer_vvect->interface~aot_top_get_val~2 proc~get_top_double_vvect get_top_double_vvect proc~get_top_double_vvect->proc~aot_table_length proc~get_top_double_vvect->interface~aot_top_get_val~2 proc~get_top_quadruple_vvect get_top_quadruple_vvect proc~get_top_quadruple_vvect->proc~aot_table_length proc~get_top_long_vvect get_top_long_vvect proc~get_top_long_vvect->proc~aot_table_length proc~get_top_long_vvect->interface~aot_top_get_val~2 proc~get_top_quadruple_v get_top_quadruple_v proc~get_top_quadruple_v->proc~aot_table_length interface~aot_top_get_val~3 aot_top_get_val interface~aot_top_get_val~3->proc~get_top_string_vvect interface~aot_top_get_val~3->proc~get_top_logical_vvect interface~aot_top_get_val~3->proc~get_top_real_vvect interface~aot_top_get_val~3->proc~get_top_integer_vvect interface~aot_top_get_val~3->proc~get_top_double_vvect interface~aot_top_get_val~3->proc~get_top_long_vvect interface~aot_top_get_val~7 aot_top_get_val interface~aot_top_get_val~7->proc~get_top_quadruple_vvect interface~aot_top_get_val~4 aot_top_get_val interface~aot_top_get_val~4->proc~get_top_integer_v interface~aot_top_get_val~4->proc~get_top_long_v interface~aot_top_get_val~4->proc~get_top_double_v interface~aot_top_get_val~4->proc~get_top_string_v interface~aot_top_get_val~4->proc~get_top_real_v interface~aot_top_get_val~4->proc~get_top_logical_v interface~aot_top_get_val~6 aot_top_get_val interface~aot_top_get_val~6->proc~get_top_extdouble_vvect interface~aot_top_get_val~8 aot_top_get_val interface~aot_top_get_val~8->proc~get_top_quadruple_v interface~aot_top_get_val~2->proc~get_top_extdouble_v proc~get_table_string_vvect get_table_string_vvect proc~get_table_string_vvect->interface~aot_top_get_val~2 proc~get_table_real_vvect get_table_real_vvect proc~get_table_real_vvect->interface~aot_top_get_val~2 proc~get_table_real_v get_table_real_v proc~get_table_real_v->interface~aot_top_get_val~2 proc~get_table_long_v get_table_long_v proc~get_table_long_v->interface~aot_top_get_val~2 proc~get_table_long_vvect get_table_long_vvect proc~get_table_long_vvect->interface~aot_top_get_val~2 proc~get_table_logical_vvect get_table_logical_vvect proc~get_table_logical_vvect->interface~aot_top_get_val~2 proc~get_table_integer_v get_table_integer_v proc~get_table_integer_v->interface~aot_top_get_val~2 proc~get_table_string_v get_table_string_v proc~get_table_string_v->interface~aot_top_get_val~2 proc~get_table_integer_vvect get_table_integer_vvect proc~get_table_integer_vvect->interface~aot_top_get_val~2 proc~get_table_logical_v get_table_logical_v proc~get_table_logical_v->interface~aot_top_get_val~2 proc~get_table_double_vvect get_table_double_vvect proc~get_table_double_vvect->interface~aot_top_get_val~2 proc~get_table_double_v get_table_double_v proc~get_table_double_v->interface~aot_top_get_val~2 interface~aot_get_val aot_get_val interface~aot_get_val->proc~get_table_string_vvect interface~aot_get_val->proc~get_table_real_vvect interface~aot_get_val->proc~get_table_long_vvect interface~aot_get_val->proc~get_table_logical_vvect interface~aot_get_val->proc~get_table_integer_vvect interface~aot_get_val->proc~get_table_double_vvect interface~aot_table_get_val~4 aot_table_get_val interface~aot_table_get_val~4->proc~get_table_string_vvect interface~aot_table_get_val~4->proc~get_table_real_vvect interface~aot_table_get_val~4->proc~get_table_long_vvect interface~aot_table_get_val~4->proc~get_table_logical_vvect interface~aot_table_get_val~4->proc~get_table_integer_vvect interface~aot_table_get_val~4->proc~get_table_double_vvect interface~aot_get_val~2 aot_get_val interface~aot_get_val~2->proc~get_table_real_v interface~aot_get_val~2->proc~get_table_long_v interface~aot_get_val~2->proc~get_table_integer_v interface~aot_get_val~2->proc~get_table_string_v interface~aot_get_val~2->proc~get_table_logical_v interface~aot_get_val~2->proc~get_table_double_v interface~aot_table_get_val~5 aot_table_get_val interface~aot_table_get_val~5->proc~get_table_real_v interface~aot_table_get_val~5->proc~get_table_long_v interface~aot_table_get_val~5->proc~get_table_integer_v interface~aot_table_get_val~5->proc~get_table_string_v interface~aot_table_get_val~5->proc~get_table_logical_v interface~aot_table_get_val~5->proc~get_table_double_v

Contents

Source Code


Source Code

  function aot_table_length(L, thandle) result(length)
    type(flu_state) :: L !! Handle for the Lua script.

    !> Handle of the table to count the enries in.
    integer, intent(in) :: thandle

    !> Returns the number of entries in the table.
    integer :: length

    length = 0
    if (aot_table_first(L, thandle)) then
      do
        length = length + 1
        call flu_pop(L)
        if (.not. flu_next(L, thandle)) exit
      end do
    end if
  end function aot_table_length