Tao.Lua SDK Documentation

Lua.lua_toboolean Method 

Converts the Lua value at the given acceptable index to a C boolean value (0 or 1). Like all tests in Lua, lua_toboolean returns 1 for any Lua value different from false and nil; otherwise it returns 0. It also returns 0 when called with a non-valid index. (If you want to accept only actual boolean values, use lua_isboolean to test the value's type.)

[Visual Basic]
Public Shared Function lua_toboolean( _
   ByVal L As IntPtr, _
   ByVal idx As Integer _
) As Integer
[C#]
public static int lua_toboolean(
   IntPtr L,
   int idx
);

Parameters

L
idx

Return Value

See Also

Lua Class | Tao.Lua Namespace