-
Notifications
You must be signed in to change notification settings - Fork 3
Booleans
Franco Montenegro edited this page May 23, 2016
·
2 revisions
function foo
local unit u = CreateUnit(...)
if (u) then
// The unit exists (works with any handler, meaning group, item, etc.)
endif
local someStruct instance = someStruct.create()
if (instance) then
// The instance is allocated
endif
local integer i = 0
if (i) then
// The integer is not zero (works with reals too)
endif
local string s = "Lorem ipsum"
if (s) then
// The length of the string is not zero
endif
endfunction