Go to the first, previous, next, last section, table of contents.


1. Introduction

1.1 Description

@command{bc} [ -hlwsqv ] [long-options] [ file ... ]

@command{bc} is a language that supports arbitrary precision numbers with interactive execution of statements. There are some similarities in the syntax to the C programming language. A standard math library is available by command line option. If requested, the math library is defined before processing any files. @command{bc} starts by processing code from all the files listed on the command line in the order listed. After all files have been processed, @command{bc} reads from the standard input. All code is executed as it is read. (If a file contains a command to halt the processor, @command{bc} will never read from the standard input.)

This version of @command{bc} contains several extensions beyond traditional @command{bc} implementations and the POSIX draft standard. Command line options can cause these extensions to print a warning or to be rejected. This document describes the language accepted by this processor. Extensions will be identified as such.

The author would like to thank Steve Sommars (Steve.Sommars@att.com) for his extensive help in testing the implementation. Many great suggestions were given. This is a much better product due to his involvement.

Email bug reports to bug-bc@gnu.org. Be sure to include the word "bc" somewhere in the "Subject:" field.

1.2 Command Line Options

@command{bc} takes the following options from the command line:

-h, --help
Print the usage and exit.
-l, --mathlib
Define the standard math library.
-w, --warn
Give warnings for extensions to POSIX @command{bc}.
-s, --standard
Process exactly the POSIX @command{bc} language.
-q, --quiet
Do not print the normal GNU @command{bc} welcome.
-v, --version
Print the version number and copyright and quit.


Go to the first, previous, next, last section, table of contents.