SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

PDC - the programmers desktop calculator

PDC is a desktop calculator similar to bc but with features designed for use by programmers. In particular PDC supports most ANSI C operators including bitwise operators and shifts. PDC also makes dealing with mixed bases very easy since it supports contant pefixes (eg 0xff, 0755).

PDC is licenced under the GNU General Public Licence. The latest version of PDC can be downloaded from http://www.redfelineninja.org.uk. Jason Hood has ported PDC to DOS/Win32 (in five different ways). These ports can be found at http://pdc.adoxa.cjb.net.

Features

  • mathematic operators +, -, *, /, %
  • logic operators &&, ||, !
  • bitwise operators &, |, ^, ~, <<, >>
  • uses ANSI C operator precedence
  • prefix numbers with 0b, 0, 0d and 0x to support binary, octal, decimal and hex regardless of input base
  • output numbers in any number base of 16 or less
  • functions to assist with 'bit bashing'
  • command line expression evaluation

Building PDC

PDC is supplied with a simple makefile. It should build with no modifications on most Unix-like operating systems. However, you may need to change the compilation flags (for example, to remove -Wall) if you are not using gcc.

By default PDC is built against the GNU readline library. If your system does not have the library installed, set WITHOUT_READLINE on the make command line (make WITHOUT_READLINE=1). You'll know if you don't have the library due to all the errors. :-) DJGPP users who have CmdEdit installed can use that instead by setting HAVE_CMDEDIT.

PDC is tested most often on Solaris and GNU/Linux. It's written in YACC and C.

Bugs and Feature Requests

Reproducable bugs and feature requests should be sent to bugs-pdc@redfelineninja.org.uk.

Comments about the DOS/Win32 ports should be sent to jadoxa@yahoo.com.au.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.