开发者

What is the difference between various implementations of dc?

dc is the Unix standard desktop calculator. AFAIK, there are different implementations (like Solaris or GNU for instance).

What is the exact difference between these implementations and what is t开发者_运维问答he minimal subset of operations you can be sure a dc implementation has?


As far as I could find, at least FreeBSD used to use the GNU-Implementation as well,1 but doesn't do so anymore. Solaris seems to have a different Implementation.2 From my first read, I mentiones these things:

  1. Solaris dc lacks these commands |, a, ~, n,

  2. Solaris lacks the commands !=, !> and !<. This is important, because it changes the way shell commands are evaluated. In GNU dc, the sequence !>... is applying the comparison, but in Solaris this would execute the rest of the line as a shell command.

  3. Solaris lacks support of # comments.

  4. In Solaris, Y prints additional debuging information.

  5. Solaris does not accept any command-line arguments.

  6. GNU dc accepts input radices up to 16, Solaris seems to be unlimited (unshure).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜