Difference between "0" and null
Posted: Sat Mar 11, 2006 8:03 pm
Simply enough, the ability for eScript to tell the difference between the number "0" and a variable that is "null" or "nothing".
https://www.forums.polserver.com/
Code: Select all
If (!value && value != 0)
'only runs on error
elseif (value == 0)
'only runs if value is explicitly 0
else
'etc
endif
Code: Select all
If (value == error)
'catches ALL errors, no matter the type
print(cstr(error));
elseif (!value)
'since error is trapped above, this would run on 0
else
'etc
endif
Code: Select all
if(value+1)
//...then it's not error :P
endif