V4MD and NULL values in lists - LINGO developers please comment

Florian Bogeschdorfer fb at memedia.de
Tue Nov 23 12:37:21 CST 2004


Hi Ruslan!

I am having a little problem with getting records as lists containing a
<NULL> value. Infact <NULL> is not a valid value for a lingo list.
You can read it, but you can e.g. not compare it:

--x is the getRecordAsPropList value
X=[#myField:<NULL>] --this will not work in the message window, you need to
get it via Valentina

Put x[1]
--<NULL>
--OK

Put x[1]=<Null>
--misplaced operator
Put x[1]="<Null>"
--0

So when you have only the record and no cursor left (like when transferring
the records via Internet, which is where my problem aroused) there is only
one solution:
Put x[1].string="<Null">
--1

However Lingo programmers like to store lists in various ways. I have not
tested famous xtras like vList, but most developers store lists in text
members like:

Member(myListStoreMember).text=myList.string

And later:

myList=member(myListStoreMember).value

Now if the list contains a <Null>, the value of the member will be 0 instead
of a list, the list is "destroyed".
So you actually have to look before storing the list and replace the <Null>
by "<Null>" or VOID for example.

Now this is maybe not a big deal, but the <Null> in a lingo list is simply
not a valid list value, maybe you can change that in the future to VOID
(Valentina 2).
Or how do other Lingo developers feel about that?

Best regards, Florian



More information about the Valentina mailing list