You have pointed out two non-standard features of GT.M which can be made to behave in a standard way by changing environmental variables. My concern is that your second example:
s X=0 i X&$i(X)
Standard behavior is to change the value of X. If you want to use non-standard features of GT.M, that is your privilege, but if you want standard behavior, then why complain about the value of X changing. It seems inconsistant to me, but perhaps I do not understand your expectations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Maury !
I thought that is the standard behavior GT.M in this example. does not compute the $ i (x). And so it is! If you want to reverse, it is necessary to set the environment variable gtm_boolean = 1. My example was about the strange behavior of the function $select ().
Thank you for your interest in my question. Konstantin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By "standard", I do not mean "normal for GT.M". The MUMPS standard is for strict, left-to-right evaluation. Normal behavior for GT.M is to short-circuit some boolean operations and to reorder some arguments. These features may improve the execution speed of GT.M, but they are non-standard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
The gtm_boolean and gtm_side_effects is 0.
This simple example shows the relationship:
In this case, all is well: variable X is not changed and the code str?@c is not executed.
Сhange the expression sites:
Variable X still does not change, but we get the error:
%GTM-E-PATCODE, Illegal syntax for pattern.
By gtm_boolean and gtm_side_effects We can change this behavior, but we get the problem elsewhere.
this changes the value of X
PS $ZV = GT.M V6.3-000 Linux x86_64
Last edit: Konstantin Aristov 2016-06-02
Konstantin,
You have pointed out two non-standard features of GT.M which can be made to behave in a standard way by changing environmental variables. My concern is that your second example:
s X=0 i X&$i(X)
Standard behavior is to change the value of X. If you want to use non-standard features of GT.M, that is your privilege, but if you want standard behavior, then why complain about the value of X changing. It seems inconsistant to me, but perhaps I do not understand your expectations.
Dear Maury !
I thought that is the standard behavior GT.M in this example. does not compute the $ i (x). And so it is! If you want to reverse, it is necessary to set the environment variable gtm_boolean = 1. My example was about the strange behavior of the function $select ().
Thank you for your interest in my question. Konstantin.
By "standard", I do not mean "normal for GT.M". The MUMPS standard is for strict, left-to-right evaluation. Normal behavior for GT.M is to short-circuit some boolean operations and to reorder some arguments. These features may improve the execution speed of GT.M, but they are non-standard.
Thank you for reporting this issue with GT.M. We have assigned it identifier GTM-8572 and will address it in a future GT.M release.
There is unfortunately no workaround other than coding around it, if you can't change gtm_boolean and gtm_side_effects.
Thanks,
Bill
Hi, Bill !
Thanks for the answer. We look forward to the new release.
Thanks,
Konstantin.