Hi everyone,from the q for mortals i noticed that there is no null values forboolean types in q. Is this true?And if this is true what is the reason for this exceptional behaviour?Regards,Kim
charset=us-ascii
X-Mailer: iPhone Mail (8F190)
In-Reply-To:
Message-Id: <28D2D722-B376-4F57-B48D-803CF4AECF59@gmail.com>
Date: Sun, 11 Sep 2011 15:19:23 -0400
To: “personal-kdbplus@googlegroups.com”
Mime-Version: 1.0 (iPhone Mail 8F190)
It is true. If a boolean had a third value it would no longer be boolean. Wh=
y would you need a null bool?=20
Am 11.09.2011 21:19, schrieb Timothy Rieder:
> It is true. If a boolean had a third value it would no longer be boolean. Why would you need a null bool?
For the same reason why other q types like int or long have null types.
This can be used to signal that something unexpected happened and even
in this case you dont want to throw an exception but return null.
Kim
To: personal-kdbplus@googlegroups.comX-Mailer: Apple Mail (2.1084)On Sep 11, 2011, at 2:29 PM, kuentang wrote:> from the q for mortals i noticed that there is no null values for> boolean types in q. Is this true?> > And if this is true what is the reason for this exceptional behaviour?also no byte null (or arguably char)q){x!null x}first each"bxc"$:()0b | 00x00| 0" " | 1also note nullness doesn’t always survive casting:q)group null"bxhijefcpmdznuvt"!“bxhijefcpmdznuvt”$0N0| "bxc"1| “hijefpmdznuvt”