You are on page 1of 3

Turbo Pascal 5.

5
Turbo Calc Information
Build Information
----------------The following files are provided in TCALC.ARC and are required
in order to build TCALC.EXE:
TCALC
TCCELL
TCCELLSP
TCHASH
TCINPUT
TCLSTR
TCMENU
TCPARSER
TCRUN
TCSCREEN
TCSHEET
TCUTIL
TCCOMPAR
TCMVSMEM

PAS
PAS
PAS
PAS
PAS
PAS
PAS
PAS
PAS
PAS
PAS
PAS
OBJ
OBJ

In addition, TCALC uses the OBJECTS module contained in the


\TP\OOPDEMOS directory. Make sure OBJECTS.TPU is available (in
the TCALC directory or in the UNIT DIRECOTRY) when building
TCALC.
Types of Cells
-------------Value: A number.
Text: A string - start it with a space to make sure that it
doesn't get parsed.
Formula: A string that is an expression (see explanation of
expressions below). This cell will be constantly updated (if
AutoCalc is on) to the current value of the expression.
Repeat: A cell with a character that will repeat indefinitely
across the spreadsheet. Type in the character that you want
to repeat with a leading backslash (example: type \_ to get
an underline across the screen).
General Information
------------------Columns range from A to CRXO (65535), and rows range from 1 to
65535.
The little dot in the upper left of a spreadsheet tells you
which of the spreadsheets is the current one. The number of the
spreadsheet is also printed, along with 'F' if formula display
is on and 'A' if AutoCalc is on.
The file that the spreadsheet will be saved to is listed at the
bottom of each spreadsheet, along with an asterisk if the
spreadsheet has been updated.

Expressions
----------Cell names in formulas are typed in with the column followed by
the row:
A1+A2
B6^5
To compute the sum of a group of cells, put a colon between the
first cell and the last cell in the group:
A1:A10

- Sum all of cells from A1 to A10 and puts the


result in the current cell.

A1:C10

- Sum of all of cells from A1 to A10, B1 to B10,


and C1 to C10 and puts the result in the current
cell.

Available Functions
------------------ABS - absolute value
ACOS - arc cosine
ASIN - arc sine
ATAN - arc tangent
COS - cosine
COSH - hyperbolic cosine
EXP - exponential function
LOG - logarithm
LOG10 - base 10 logarithm
POW10 - raise argument to the 10th power
ROUND - round to the nearest whole number
SIN - sine
SINH - hyperbolic sine
SQR - square
SQRT - square root
TAN - tangent
TANH - hyperbolic tangent
TRUNC - return the whole part of a number
Examples:
TRUNC(A1)
SQRT(SQR(34.5))
ABS(TRUNC(B16))
Shortcut Commands
----------------AltX
Ins
Del
F2
AltF2
F3
AltF3
F4
F6
F7

Quit
Turn block on and off
Delete current cell
Save current spreadsheet
Save as
Replace current spreadsheet
Load new spreadsheet (opens up additional window)
Delete current spreadsheet
Next spreadsheet
Toggle formula display on/off

F8
F9
F10
ASCII keys

Toggle AutoCalc on/off


Recalc
Main menu
Add cell

The Parser
---------The state and goto information for the parser was created using
the UNIX YACC utility. The input to YACC was as follows:

%token CONST CELL FUNC


%%
e : e '+' t
| e '-' t
| t
;
t : t '*' f
| t '/' f
| f
;
f : x '^' f
| x
;
x : '-' u
| u
;
u : CELL ':' CELL
| o
;
o : CELL
| '(' e ')'
| CONST
| FUNC '(' e ')'
;
%%

You might also like