Question
Eduard Lebedyuk · Jan 26, 2019

NULL placeholder in $List functions?

Today in docs I found this example using NULL:

 WRITE $LISTVALID($LB(NULL)),!

simplified

zzdump $LB(NULL)

and NULL can be case-insensitive:

zzdump $LB(null)

seems the same as just:

zzdump $LB()

But if null variable is defined then list would contain value from variable. Case sensitive in that situation.

Does anyone have any Idea what is this? Is NULL used anywhere besides as a list element?

0
0 248
Discussion (5)0
Log in or sign up to continue

Null in this case is not a reserved word. It’s just a name of variable that is not defined.

Thank you,. Alexander.

Really didn't think that it could be any undefined variable.

I'd personally prefer that $LB(var) also follows the elementary rules of COS.
Though I have no hope on any ProdLog on this subject

as pointed out by Alexander Koblov  already:

you can create a $LB() od $LB(undefined) and it's all the same

set a=$LB() zzdump a
0000: 01

or 

write $d(undefined)

0

set a=$lb(undefined) zzdump a

0000: 01

Your coincidence of NULL, null, Null, nuLL,  .... is just an optical eye-catcher without syntactical relevance in COS

Thank you, Robert!

I'll file a prodlog (about the docs), so we'll see.