LUA_TONUMBER(3) Library Functions Manual LUA_TONUMBER(3)

lua_tonumberconverts the Lua value to the C type, function indicator [-0, +0, -] lua_Number(3)

#include <lua.h>

lua_Number
lua_tonumber(lua_State *L, int index);

() converts the Lua value at the given acceptable index to the C type lua_Number(3). The Lua value must be a number or a string convertible to a number; otherwise, lua_tonumber returns 0.

lua_Number(3)

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The lua_tonumber() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 18, 2022 Debian