views:

10

answers:

1

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 the minimal subset of operations you can be sure a dc implementation has?

A: 

As far as I could find, at least FreeBSD uses the GNU-Implementation as well,1 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).

FUZxxl

related questions