代码之家  ›  专栏  ›  技术社区  ›  whymath

为什么SAS不支持短路操作员?

  •  0
  • whymath  · 技术社区  · 7 年前

    在SAS中运行代码
    data _null_; if 1 or sum(.) then put 'Hi!'; run;
    它报告生成了缺失值,表明“或”不是短路运算符。
    为什么SAS不支持短路操作?

    0 回复  |  直到 7 年前
        1
  •  7
  •   Richard    7 年前

    最有力的论据是继续正确操作所有有意或无意依赖它的遗留SAS代码。

    至于最初的原因,这将是发起者的一个问题。 https://en.wikipedia.org/wiki/SAS_(software)#Origins