Friday, September 26, 2008

Most common way to check for nil value

This is copied from another blog but worth repeating

IF{/SOMEVALUE="" @SOMETHING} <--- THIS WILL NOT WORK To test for a Nil value in a variable, you can concatenate a known value like a period to the variable and then check to see if the period and variable are equal. If they are equal, the variable had a Nil value. If the equation is not equal you know that the variable was not Nil. The following logic is one valid way to check for a Nil value: IF{/SOMEVALUE_.=. DO SOMETHING} <--- THIS WILL WORK

0 comments: