false (value)


The false value is a boolean "zero". It is the only alternative to the boolean true value.

Examples

Suppose you want to attach the image pointer im to a CImage object I. The following script tests whether Attach was successful:

bSuccess = I:Attach( im )

-- returns true if im is attached.

if bSuccess == false then Exit() end

-- Exit if bSuccess is false

Alternatively, the same result may be obtained by simpler, more compact code that does not test against false:

bSuccess = I:Attach( im )

-- returns true if im is attached.

if not bSuccess then Exit() end

-- Exit if bSuccess is false

Related Topics

true

nil