Returns whether the specified stack object is empty.
Syntax
empty( stack )
stack.stack( )
Parameters
stack
|
the stack object to check.
|
Returns
boolean
|
true if stack is empty.
false if stack is not empty.
|
Example
s = Stack( )
if s.empty( ) then
print( "ok" )
end
s.push( "a" )
if s.empty( ) then
print( "error" )
end
|