If a variable has not been set, I have been coding
Code: Select all
if $var = ''Code: Select all
if var == ''So, if I am running down a list and setting a flag:
First setting the variable to "set" because it is my default and what I am checking against
Code: Select all
$flag = "set"Code: Select all
if ($first_item == '') {
$flag = "not set";
}Code: Select all
if ($first_item = '') {
$flag = "not set";
}Will the '=' always assign value - "equals", even if part of an if statement? (Kind of ignoring the 'if'... which is why I am confused)
Does the '==' act as a comparison operator - "is equal to"
And what about NULL? We used to code:
Code: Select all
if @var ISNULLI appreciate your time.
Thank you.