Hi all,
Can anyone provide a technical answer to what "NIL" is and how to use it in the scripting language?
For instance in m5l2b.scr I see the following:
if( level.drive == NIL || level.drive.size == 0)
{
level.drive[0] = dfr_drive_01h_2
...blah......blah....
if (level.prev_drive != NIL)
Obviously it means something different then NULL, where NULL is treated like "\0" as is standard usuage in C-Language. So:
if ($(self.basename) != NULL)
self.basename remove
self remove
Where if the basename is still in existence, then remove it.
NIL means something different, and I have not found an explaination for what it stands for in any of the Script documents or ClassLevel Doc supplied by MOHRadiant etc..
thanks...
Exactly what is "NIL" as used in the scripting lan
Moderator: Moderators
thanks Alcoholic and Nuggets...
Your answers sound reasonable and are probably correct. NIL in the English language does mean.... Nothing or does not exits. Just wanted
to make sure.
And I can see where it could have an application within the scripting language, where a thread might be called and within it contain various logic that test to see if a variable was created or not AT THAT POINT in time and then apply the resultant decision to continue or set it to something or whatever.
Thanks guys.
cheers
to make sure.
And I can see where it could have an application within the scripting language, where a thread might be called and within it contain various logic that test to see if a variable was created or not AT THAT POINT in time and then apply the resultant decision to continue or set it to something or whatever.
Thanks guys.
cheers
grb
nuggets...
That is what the NULL test is supposed to be for, or at least that is the way
I enterprete it....guess I simply should make a bunch of test cases up.
In some language systems one tests for NULL on a variable to see if it
exists but never was set to anything. NIL, as you two had indicated in your original statements indicates that the variable does not exists.
To test to see if the variable is not set to something (not defined as I believe your wording indicates) one would test for NULL.
Thanks for the feedback.
cheers all
I enterprete it....guess I simply should make a bunch of test cases up.
In some language systems one tests for NULL on a variable to see if it
exists but never was set to anything. NIL, as you two had indicated in your original statements indicates that the variable does not exists.
To test to see if the variable is not set to something (not defined as I believe your wording indicates) one would test for NULL.
Thanks for the feedback.
cheers all
grb