%
represents the last expression obtained by Jacal. It
can be used in formulas like any other constant or variable or
expression.
e21: 5 e22 : %; e22: 5 e23 : %^2; e23: 25
batch
is used to read in a file containing programs
written in Jacal. Here, filename is a string in double quotes. The
precise way in which one refers to a file is, of course, system
dependent.
batch("demo");
of the file demo in the JACAL directory will give a demonstration of JACAL's capabilities.
commands
produces a list of all of the command
available in Jacal. It is called as s function of no arguments.
Explicitly:
e21 : commands(); u-/+ u+/- transpose transcript differential terms system sylvester show set scalarmatrix row resultant rapply quit qed poly_discriminant poly or num negate mod minor matrix load listofvars ident genmatrix gcd finv factor example eliminate dotproduct divide diff diagmatrix determinant describe denom crossproduct content commands col coeffs coeff bunch batch b+/- ^^ ^ = / - + * %
describe
is the heart of the online help facility of
Jacal. Here, command is a string which is the name of a command
and describe
produces a brief description of the command and in
many cases includes an example of its use. Together with the command
commands()
, which prints a list of all available Jacal commands,
and the command example
, which gives an example of the use of the
command, one can in principle use Jacal without a manual after one has
learned how to get started.
e27 : describe(col); column. column of a matrix e27 : describe(resultant); resultant. The result of eliminating a variable between 2 equations (or polynomials). 27 : describe(+); Addition, plus. a + b
Here, command is a string which is the name of a Jacal command.
example
gives an example of the use of the command.
See also section Miscellaneous.
e43 : example(+); a + b e43: a + b
load
takes as input a string and reads in a
`Scheme' file whose name is obtained by appending the extension
`.scm' to the string. If you want to read in a file of Jacal
commands, do not use load
. Instead use the command
batch
. To load in the file `foo.scm',
e9 : load("foo"); e9: foo
(math)
.
If you do not wish to return to Jacal but really want to terminate the
session and return to the operating system, then after typing
qed();
, type (slib:exit)
or use quit
.
type qed(); to return to scheme e1 : qed(); scheme > (math) type qed(); to return to scheme e2 : quit(); unix>
system
. For example, in a UNIX
operating system, the command system("ls");
will print the
directory. One way in which the command system
might be
especially useful is to edit files containing Jacal scripts without
leaving Jacal, particularly in non-UNIX machines or on machines without
GNU emacs.
e0 : system("echo hi there"); hi there e0: 0
e1 : terms(); GNU GENERAL PUBLIC LICENSE ************************** Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
[ rest deleted for brevity]
transcript
allows one to record a Jacal session. It
is called with the syntax transcript(string);
, where
string is the name of the file in which one wants to keep the
transcript of the session. When one wishes to stop recording, one types
transcript();
. One is then free to use transcript
again
later in the session on another file. One can use it on the same file,
but the file is overwritten. Presently, the command transcript
does not echo commands to a file.
e9 : a:[1,2,3]; e9: [1, 2, 3] e10 : transcript("foo"); e10: foo e11 : a; e11: [1, 2, 3] e12 : transcript(); e12 : system("cat foo"); e10: foo e11 : a; e11: [1, 2, 3] e12 : transcript(); e12: 0
show
is
closely related, allowing one to see what the current settings are.
show
enables the Jacal user to examine the current
setting of various flags as well as to list the flags that can be set by
the user and to display other information. To change the settings of the
flags, use the command set
. To see all the information accessible
through the show
command, type show all
. To see the
available grammars, type show grammars
. To see the current input
grammar type show ingrammar
. To see the current output grammar,
type show outgrammar
. To see the current priority for printing
expressions, type show priority
.
e1 : show all; prompt priority outgrammar ingrammar grammars all e1 : show prompt; e1: e1 e3 : show priority; :@ (differential :@) @3 @2 @1 %inftsl y x u-/+ u+/- transpose transcript differential terms t system sylvester showpriority show set scalarmatrix row resultant rapply quit qed prompt priority poly_discriminant poly or num negate mod minor matrix load listofvars ident genmatrix gcd finv factor example eliminate e1 dotproduct divide diff diagmatrix determinant describe denom crossproduct content commands col coeffs coeff c bunch batch b-/+ b+/- b all a ^^ ^ = / - + * % %sqrt1 %i e3 : show outgrammar; e3: disp2d e4 : show ingrammar; e4: standard e5 : show grammars; e5: [disp2d, standard, schemepretty, scheme]
Go to the first, previous, next, last section, table of contents.