Datatree MUMPS - 将未定义的变量解析为 null/空字符串?
我正在尝试将一些脚本从现代版本的 Intersystems Cache 移植回 1980 年代的 Datatree MUMPS。它是在设置 $ZUTIL(18,2) 的上下文中编写的。也就是说,未定义的变量解析为空字符串,而不是抛出“未定义的变量”错误。
有谁知道 DTM 是否支持类似的功能来自动解析每个进程或全局的未定义变量,而不是重构所有内容来检查 $DATA?
*更新:运行“zzswitch +2”就可以了。
I'm trying to port some scripts from a modern version of Intersystems Cache back to 1980s Datatree MUMPS. It was written in the context where $ZUTIL(18,2) was set. That is, undefined variables resolve to an empty string, rather than throwing an "undefined variable" error.
Rather than refactor it all to check $DATA, does anyone know whether DTM supports a similar feature to automatically resolve undefined variables per process, or globally?
*Update: running "zzswitch +2" did the trick.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那是一件棘手的事情。
查看此文档:
ftp://ftp.intersystems.com/pub/cache/ DTMtoCache.doc95
它说 DTM 中相当于 $ZU(18) 的是 zzswitch +2 / -2
我显然现在无法运行 DTM,所以只需尝试发出 zzswitch +2 然后zzswitch -2 并查看它如何影响未定义变量的处理方式。
PS:我可以理解从 DTM 迁移到 Cache 的努力,但是要回去吗?伙计,这甚至不是死灵术,现在是考古学了。
That was tricky one.
Have a look at this document:
ftp://ftp.intersystems.com/pub/cache/DTMtoCache.doc95
It says that equivalent of $ZU(18) in DTM was zzswitch +2 / -2
I obviously can't run DTM now so just try to issue zzswitch +2 and then zzswitch -2 and see how does it affect the way your undefined vars are treated.
PS: I would understand efforts of migrating from DTM to Cache, but going back? Mate it's not even necromancy, it's archeology now.