use "" as an array key
Peter TB Brett
peter.brett at livecode.com
Thu Sep 22 14:27:45 EDT 2016
On 22/09/2016 18:58, Matt Maier wrote:
> I find myself in want of a YAML library again. Mark posted some functions
> on the forum that I'm debugging
> http://forums.livecode.com/viewtopic.php?f=7&t=21434
>
> Something I discovered while debugging is that "" is being accepted as an
> array key.
>
> It seems like it shouldn't be possible to use the absence of a string as an
> array key. Is it supposed to work that way? I'm using 8.0.1 on Windows.
"" isn't "the absence of a string", it's a string that's 0 characters
long. Being able to use it as an array key is important for being able
to represent real-world data in an array.
Peter
--
Dr Peter Brett <peter.brett at livecode.com>
LiveCode Technical Project Manager
lcb-mode for Emacs: https://github.com/peter-b/lcb-mode
More information about the use-livecode
mailing list