On Mon, Oct 2, 2017 at 1:28 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx> wrote:
You raise the matter of what NULL means.
In database, it is an __attribute__ - not really a value, although even IBM
uses the incorrect phrase, null value.
I think that's a bit pedantic, as well as being RPG-centric.
The true, conceptual meaning of NULL in a database context is the
absence of any value. But, like anything else in computing, that has
to be *implemented* in some way.
I think the implementation most people would come up with on their own
(and thus what I believe is intuitive for most people) is what lots of
programming languages do in similar contexts: Reserve a very special
sentinel value which isn't equal to any "valid" value, and allow this
special value to be stored in place of a valid value. We can call this
special value the "null value".
Ideally, whether some piece of storage can be described as "being in a
null state" (a.k.a. "having the null attribute on") or "containing a
null value" should be two sides of the same coin. If something can be
described by the adjective "null", then it should be (or contain) the
noun "null". And vice versa.
RPG isn't like this. It exposes the adjective null as something
separate from (and entirely independent of!) the contents, and doesn't
provide any noun null.
John Y.
As an Amazon Associate we earn from qualifying purchases.