# aot_table_first Function

## public function aot_table_first(L, thandle) result(exists)

Load the first key-value pair of table thandle on the stack.

This serves as an entry point, further traversal can be done by flu_next(L, thandle). If there are no entries in the table the function returns false, otherwise the result will be true.

### Arguments

Type IntentOptional AttributesName
type(flu_state) :: L

Handle for the Lua script.

integer, intent(in) :: thandle

Handle to the table to get the first entry of.

### Return Value logical

The return value signals, if there actually is such a first entry.

## Source Code

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

!> Handle to the table to get the first entry of.
integer, intent(in) :: thandle

!> The return value signals, if there actually is such a first entry.
logical :: exists

if (thandle /= 0) then
call flu_pushnil(L)
exists = flu_next(L, thandle)
else
exists = .false.
end if
end function aot_table_first