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


Miscellaneous

Command: %
The symbol % 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

Command: batch filename
The command 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.

Command: commands
The command 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+/- ^^ ^ = / - + * %

Command: describe command
The command 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

Command: example command

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

Command: load string
The Jacal command 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

Command: qed
Exit from Jacal to Scheme. With interactive Scheme systems (such as SCM), It does not return you to the operating system. Instead it suspends Jacal and returns you to the underlying scheme. You can return to the Jacal session where you left off by simply typing (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.

Command: quit
Exit directly from Jacal to the operating system. You will not be able to continue your Jacal session.

type qed(); to return to scheme
e1 : qed();
scheme
> (math)
type qed(); to return to scheme
e2 : quit();
unix>

Command: system command
One can issue commands to the operating system without leaving Jacal. To do this, one uses the command 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

Command: terms
Prints a copy of the GNU General Public License
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]

Command: transcript string
The command 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

Command: set flag value
There are various flags that the Jacal user can control, namely the Jacal command line prompt, the priority for printing terms in Jacal output, the input grammar and the output grammar. For a discussion of the various grammars please See section Flags. The command show is closely related, allowing one to see what the current settings are.

Command: show flag
The command 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.