Multidemensional dictionary

  1. Some of the examples above revealed holes in the parser, for which great thanks.

  2. For example, [ [1;2]; [3;4]; [5;6] ] is not handled correctly.

  3. A fix for this will take a couple of days. A side-effect will be a larger suite of examples.

2 Likes

FWIW, I’ve started moving aTbRef examples over to the new [] and {} notations. I think they are more expressive of intent (clearer) even if I’m fighting muscle memory.

As these notations are new—at least new to use by a wider group of users—I’d note that people digging hard into nesting may spot edge cases and please report them here, or better direct to Support ( tinderbox@eastgate.com) in either case ideally with steps to reproduce the issue. The sooner the clearly reported, the sooner a fix is likely.

So testing case #2 above:

we can see the first write to $Text (edict line #3) fails. The upside is that—in v9.6.0—the old, quote-enclosed form, still works. So, even if some new syntax may have the odd glitch, older forms work in lieu and there is no requirement to go ‘update’ all your old code in existing docs: if it was working it will be still.

In line 3, the edict writes "new: " and $MyList[1].
In line 4, I believe the edicts erases that as writes “old:” and $MyListA[1].

Gah, that was me not checking code after a crash (emailed, and user error!)). What follows isn’t a further problem but just some review of the old/new syntax and contextualising the above.

An interesting wrinkle, checking the last out was, that applied by code, the outer [] notation brackets are stripped in the stored List-type data in $MyList:

If I remove the code assignment of list values and put them in by hand:

It works for $MyList. The second test doesn’t fail, as some might assume. If I change the list item called in the test to get the first list item, instead of the second, we see why:

Adding surrounding quotes into the value box for $MyListA makes it into a single item list (and that single item is not a list of lists but a single literal string):

Frankly, it’s years since I recall anyone using literal quotes around a Displayed Attributes value box list (whereupon it behaves—as expected—as a single literal string). A win for the new syntax is the parser happily understands the extra enclosing brackets if found and gets the answer right. Excellent!

2 Likes