next up previous contents index
Next: Defining constants Up: Constants and functions Previous: Constants and functions

Introduction

By the term constant we mean a scalar value which is calculated once from its definition, and then remains available until it is redefined or deleted. By function we mean a scalar value which is calculated afresh from its definition every time it is required. In this way, functions serve as primitive subroutines. The C:  command is used to define constants, and the F:  command to define functions. They are deleted by using the XC:  and XF:  commands respectively. Constants and functions can be inspected by using the c  and f  arguments to the LOOK:  command.

Generally, we precede the names of constants with the ``%'' symbol, and the names of functions with the ``#'' symbol. It is never a mistake to include these symbols, but they can sometimes safely be omitted, principally when they are being defined or deleted.

Constants and functions are used in [B/D] equations just as though they are numbers.



David Wooff
Wed Oct 21 15:14:31 BST 1998