NetBSD/gnu/usr.bin/bc
phil 1e81068b29 Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
..
Examples Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
Test Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
COPYING
ChangeLog Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
Install Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
Makefile Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
Makefile.in Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
README Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
README.NetBSD Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
VERSION Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
acconfig.h Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
bc.1 Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
bc.y Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
bcdefs.h Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
config.h Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
configure.in Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
const.h Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
execute.c Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
fix_libmath.h Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
global.c Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
global.h Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
install-sh Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
libmath.b Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
libmath.h Import of GNU bc-1.03 1994-12-01 04:23:53 +00:00
load.c Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
main.c Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
number.c Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
number.h Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
proto.h Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
sbc.y Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
scan.l Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
storage.c Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
util.c Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
version.h Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00
vfprintf.c Updating to 1.03 with RCS added to most .[chyl] files 1994-12-02 00:43:14 +00:00

README

This is GNU bc version 1.03.

Changes from 1.02

	minor bug fixes in bc.

	addition of Ken Pizzini's dc program that uses the GNU bc 
	arbitrary precision arithmetic routines.

Changes from 1.01
	
	minor bug fixes.


-------- Original comp.sources.reviewed README --------

Program: GNU bc
Author: Philip A. Nelson
E-mail: phil@cs.wwu.edu
OS: UNIX (BSD, System V, MINIX, POSIX)
Copying: GNU GPL version 2
Copyright holder: Free Software Foundation, Inc. 
Version: bc version 1.01
Required: vsprintf and vfprintf routines.
Machines: It has been compiled and run on the following environments:
	BSD4.3 (VAX 11)
	MINIX 1.5 (IBM PC, both K&R and ANSI compilers)
	MINIX 1.5 (pc532)
	SUN-OS 4.1 (SUN 3 and SUN 4)
	SVR3V5 (Motorola 68K)
	SVR3.2 (3B2)
	SVR4.0.2 (a 386 box)
	ULTRIX 4.1 (DEC 5000)
	UTS (Amdahl)

bc is an arbitrary precision numeric processing language.  Syntax is
similar to C, but differs in many substantial areas.  It supports
interactive execution of statements.  bc is a utility included in the
POSIX P1003.2/D11 draft standard.

This version was written to be a POSIX compliant bc processor with
several extensions to the draft standard.  Option flags are available
to cause warning or rejection of the extensions to the POSIX standard.
For those who want only POSIX bc with no extensions, a grammar is
provided for exactly the language described in the POSIX document.
The grammar (sbc.y) comes from the POSIX document.  The Makefile
contains rules to make sbc.  (for Standard BC)

Since the POSIX document does not specify how bc must be implemented,
this version does not use the historical method of having bc be a
compiler for the dc calculator.  This version has a single executable
that both compiles the language and runs the a resulting "byte code".
The "byte code" is NOT the dc language.

Also, included in the initial distribution is the library file
vfprintf.c for MINIX systems.  My minix 1.5 did not have this file.
Also, you should verify that vsprintf.c works correctly on your
system.

The extensions add some features I think are missing.  The major
changes and additions for bc are (a) names are allowed to be full
identifiers ([a-z][a-z0-9_]*), (b) addition of the &&, ||, and !
operators, (c) allowing comparison and boolean operations in any
expression, (d) addition of an else clause to the if statement, (e)
addition of a new standard function "read()" that reads a number from
the standard input under program control, (f) passing of arrays as
parameters by variable, (g) addition of the "halt" statement that is
an executable statement unlike the quit (i.e.  "if (1 == 0) quit" will
halt bc but "if (1 == 0) halt" will not halt bc.), and (h) the
addition of the special variable "last" that is assigned the value of
each print as the number is printed.