A confusing experience
During my last migration to IRIS I met this Compatibility parameter
- NullSubscripts true
0 - Throw error when referencing a null subscript. 1 - Null subscript references do not throw an error.
The consequences are shocking. This was allowed:
USER>zw ^rcc
^rcc=0
^rcc("")="***"
^rcc("",1)="*,1"
^rcc(1,"")="1,*"
^rcc(1,2)="1,2"
^rcc(1,2,"")="1,2,*"
ObjectScriptObjectScript
But SMP had no idea what is going on.
And after switching off that flag this was still partialy visible, but read-only
USER>zw ^rcc
^rcc=0
^rcc(1,"")="1,*"
^rcc(1,2)="1,2"
^rcc(1,2,"")="1,2,*"
ObjectScriptObjectScript
I just don't understand.
Product version: IRIS 2022.3
$ZV: IRIS for Windows (x86-64) 2022.3 (Build 606) Mon Jan 30 2023 09:20:17 EST
Documentation has an important note about this parameter:
This parameter has been retained for compatibility, but should not be used when building new applications.
https://docs.intersystems.com/iris20223/csp/docbook/Doc.View.cls?KEY=RAC...
Fully with you.
But in migration, you have no choice.
With several thousands of Globals, there is no chance to find out
if some crazy chap had used it decades ago.
When I saw it the first time I must have looked like Kong Kong.
I remember working on a system like that written in something called MaxiMumps. When doing their equivalent of $Order the second time you found null was the end of the subscript range.
They also had an post-conditional character ";" which behaved like "if not". These two lines were effectively the same.
S:A'=B C=D
S;A=B C=D
...to save a character!
Oh Dear!
but Memory was expensive.
But my first DSM-like OS on VAX was only ~ 80KB code at run time. (40+ years back)
All the rest for Partitions and Buffers, .
lol...y'all are reminding of my 'time served' with MIIS! That was not fun.