Next: , Previous: slua_tbl_el_si, Up: Manipulating Tables


A.2.6 slua_tbl_el_n

get a numeric element from a table

Synopsis

     #include <luasup/luasup.h>
     
     
     
int slua_tbl_el_n( lua_Object table, const char *index, double *value );

Parameters

lua_Object table
the table containing the data
const char *index
the index of the element
double *value
the output value of the element

Description

retrieve the value of an element in a table. The value should be representable as a number.

Returns

It returns zero if all went well and `1' if the element didn't exist. If the element doesn't exist, *value is unchanged.

Author

Diab Jerius