Next: The xtpanel generator
Up: EXAMPLES
Previous: ed1D
Figure
is an example that emphasizes xtpanel's ability to take
advantage of the many powerful but non-interactive features built
into UNIX. The bc calculator built into UNIX has most of the
features of a standard scientific calculator. But it lacks a nice
interactive interface. The X windows source distributed by MIT
contains an interactive calculator xcalc. Written in C,
xcalc is over 2000 lines long, and doesn't take advantage of the
calculator already available in UNIX. The xtpanel script uses
the bc calculator and provides an interface similar to that of
xcalc. The script is 80 lines long, and available on
the CD-ROM version of the report.
calculator
Figure 13 A calculator built using
xtpanel. The 80 line script gives a calculator with features comparable
to the 2000 line C program xcalc.
|
|  |
It is likely that this 80 line script required much less
time to write than the xcalc application. And because the script
syntax is very simple, adding features to this calculator would
be a much easier task than adding features to xcalc.
Next: The xtpanel generator
Up: EXAMPLES
Previous: ed1D
Stanford Exploration Project
11/17/1997