[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
Re: [ddlm-group] Handling of missing and null in dREL
- To: James Hester <james.r.hester@gmail.com>, Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
- Subject: Re: [ddlm-group] Handling of missing and null in dREL
- From: "Herbert J. Bernstein" <yayahjb@gmail.com>
- Date: Tue, 14 Jan 2020 05:49:54 -0500
- In-Reply-To: <CAM+dB2dFjxUnYRwVUH1gN6SKoSg8CQMRvfw-kHJmTk2axJ4+aA@mail.gmail.com>
- References: <CAM+dB2dFjxUnYRwVUH1gN6SKoSg8CQMRvfw-kHJmTk2axJ4+aA@mail.gmail.com>
Dear James,
I would hope that '.' and '?' each would be testable for equality so that dREL logic could take appropriate distinct action in each case. Otherwise we need a new built-in function to provide the necessary test.
Regards,
Herbert
On Tue, Jan 14, 2020 at 1:09 AM James Hester <jamesrhester@gmail.com> wrote:
Dear DDLm group,_______________________________________________Happy New Year to all.In preparing the Volume G chapter on dREL I noticed that, while 'missing' and 'null' have been added to dREL as values, there was no discussion about how they would behave when appearing in expressions. I have therefore composed the following two paragraphs, and would appreciate any insight you might have as to problems with the behaviour as stated. While the behaviour for 'missing' is a standard 3-valued logic, the behaviour of null has essentially been dreamt up by me. Note that 'missing' refers to a data value of '?' in a CIF file and null refers to '.'.If there are no objections, these paragraphs will eventually find their way into the standard via Volume G.thanks,James.===========Computations with missing and null values
A value of missing implies that all values in the domain of the data name are possible. Unless otherwise stated, missing values propagate: where missing is an argument to an arithmetic operator or mathematical function, the result will also be missing. Logical operations follow the rules of three-valued logic: A OR missing is true iff A is true, otherwise the result is missing. Likewise, A AND missing is false iff A is false, otherwise the result is missing. An equality test between two values, where at least one is missing, will result in missing. Comparisons between values, where at least one is missing, result in missing. The latter behaviour means that the built-in 'sort' function will return missing if any of the elements of the sorted list have a value of missing. dREL methods may not explicitly test for missing values; the result of comparing missing with missing is missing.
The behaviour of arithmetic operators and built-in mathematical functions is undefined for null arguments. These functions will therefore return missing if any arguments are null. Logical operations and comparisons with null also behave identically to missing, with the important exception that equality with null can be tested. dREL methods can therefore invoke particular behaviour where null is part of the domain of a data value, and this will often serve to specify the interpretation of null in the context of the defined data name.--T +61 (02) 9717 9907
F +61 (02) 9717 3145
M +61 (04) 0249 4148
ddlm-group mailing list
ddlm-group@iucr.org
http://mailman.iucr.org/cgi-bin/mailman/listinfo/ddlm-group
_______________________________________________ ddlm-group mailing list ddlm-group@iucr.org http://mailman.iucr.org/cgi-bin/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
- Follow-Ups:
- Re: [ddlm-group] Handling of missing and null in dREL (James Hester)
- References:
- [ddlm-group] Handling of missing and null in dREL (James Hester)
- Prev by Date: [ddlm-group] Handling of missing and null in dREL
- Next by Date: Re: [ddlm-group] Handling of missing and null in dREL
- Prev by thread: [ddlm-group] Handling of missing and null in dREL
- Next by thread: Re: [ddlm-group] Handling of missing and null in dREL
- Index(es):