3 Extra configuration options:
5 --with-readline tells bc to use the readline package that allows
6 for editing input lines when run interactive.
8 --with-editline tells bc to use the BSD editline package that
9 allows for editing input lines when run interactive.
13 The simple make compiles a version of bc with fixed parameters
14 for the recursive multiplication algorithm. The fixed parameter
15 is the number of digits where a sequential algorithm is used
16 instead of the recursive algorithm. It is set to a value that
17 is known good on a couple of machines. (Sparc Ultra 10, Pentium
18 II, 450.) I'm calling this point the crossover point.
20 To make a version of bc with a custom crossover point for your
21 machine, do the following steps:
26 The timetest step takes a minimum of 10 minutes to complete.
29 -------- Original comp.sources.reviewed README --------
32 Author: Philip A. Nelson
33 E-mail: phil@cs.wwu.edu
34 OS: UNIX (BSD, System V, MINIX, POSIX)
35 Copying: GNU GPL version 2
36 Copyright holder: Free Software Foundation, Inc.
37 Version: bc version 1.01
38 Required: vsprintf and vfprintf routines.
39 Machines: It has been compiled and run on the following environments:
41 MINIX 1.5 (IBM PC, both K&R and ANSI compilers)
43 SUN-OS 4.1 (SUN 3 and SUN 4)
50 bc is an arbitrary precision numeric processing language. Syntax is
51 similar to C, but differs in many substantial areas. It supports
52 interactive execution of statements. bc is a utility included in the
53 POSIX P1003.2/D11 draft standard.
55 This version was written to be a POSIX compliant bc processor with
56 several extensions to the draft standard. Option flags are available
57 to cause warning or rejection of the extensions to the POSIX standard.
58 For those who want only POSIX bc with no extensions, a grammar is
59 provided for exactly the language described in the POSIX document.
60 The grammar (sbc.y) comes from the POSIX document. The Makefile
61 contains rules to make sbc. (for Standard BC)
63 Since the POSIX document does not specify how bc must be implemented,
64 this version does not use the historical method of having bc be a
65 compiler for the dc calculator. This version has a single executable
66 that both compiles the language and runs the a resulting "byte code".
67 The "byte code" is NOT the dc language.
69 Also, included in the initial distribution is the library file
70 vfprintf.c for MINIX systems. My minix 1.5 did not have this file.
71 Also, you should verify that vsprintf.c works correctly on your
74 The extensions add some features I think are missing. The major
75 changes and additions for bc are (a) names are allowed to be full
76 identifiers ([a-z][a-z0-9_]*), (b) addition of the &&, ||, and !
77 operators, (c) allowing comparison and boolean operations in any
78 expression, (d) addition of an else clause to the if statement, (e)
79 addition of a new standard function "read()" that reads a number from
80 the standard input under program control, (f) passing of arrays as
81 parameters by variable, (g) addition of the "halt" statement that is
82 an executable statement unlike the quit (i.e. "if (1 == 0) quit" will
83 halt bc but "if (1 == 0) halt" will not halt bc.), and (h) the
84 addition of the special variable "last" that is assigned the value of
85 each print as the number is printed.
86 -----------------------------------------------------------------------