Next: , Previous: , Up: Top   [Contents][Index]

6 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.


of the file demo in the JACAL directory will give a demonstration of JACAL’s capabilities.

Command: tex expr
Command: scheme expr
Command: disp2d expr
Command: standard expr

Displays expr in TeX, Jacal’s two-dimensional output format, or Jacal’s infix input format, respectively.

Command: tex string

Read TeX expression string.

Command: scheme string

Read Scheme expression string.

Command: disp2d string
Command: standard string

Reads string in Jacal’s infix input format.

e24 : b^2-4*a*c;

e24: b  - 4 a c

e25 : tex(e24);
b^{2} - 4\,a\,c
e25 : tex("b^{2} - 4\,a\,c");

e25: b  - 4 a c

e26 : disp2d(e25);
b  - 4 a c
e26 : disp2d("b^2-4*a*c");

e26: b  - 4 a c

e27 : scheme(e26);
(- (^ b 2) (* 4 a c))

e27 : scheme("(- (^ b 2) (* 4 a c))");

e27: b  - 4 a c
Command: commands

The command commands produces a list of all of the command available in Jacal. It is called as a function of no arguments.

e21 : commands();

% * + - / = ^ ^^ abs args augcoefmatrix b+/- b-/+ batch berl bunch cabs
cartprod chain charpoly coeff coeffs coefmatrix cofactor col commands
compose content continue crossproduct decompose degree denom depends
describe determinant diagmatrix diff differential discriminant disp2d
divide dotproduct elementwise eliminate equatecoeffs example extrule
factor factorial factors ffsff finv flatten func gcd genmatrix help ident
imagpart integrate interp interp.lagrange interp.neville interp.newton
jacobi jacobian listofvars load matrix minor mod ncmult negate num or
over parallel parfrac partial poly polydiff polyelim prime? qed quit rank
rapply realpart require restart resultant row scalarmatrix scheme set sff
shadow show standard sylvester system taylor terms tex transcript
transpose u+/- u-/+ usff verify wronski wronskian
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 describe.

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();
> (math)
type qed(); to return to scheme
e2 : quit();
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 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <>
 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 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;

all debug echogrammar grammars horner ingrammar linkradicals outgrammar
page phases priority prompt trace version width

e1 : show prompt;

e1: e1

e3 : show priority;

:@ (differential :@) @3 @2 @1 y x wronskian wronski verify u-/+ u+/-
transpose transcript tex terms t system sylvester standard show shadow
set scheme scalarmatrix row resultant restart require realpart rapply
rank quit qed prompt priority prime? polyelim polydiff poly partial
parallel over or num negate ncmult mod minor matrix load listofvars
jacobian jacobi interp.newton interp.neville interp.lagrange interp
imagpart ident help genmatrix gcd func flatten finv factors factorial
factor extrule example equatecoeffs eliminate elementwise e0 dotproduct
divide disp2d discriminant differential diff diagmatrix determinant
describe depends denom degree crossproduct continue content commands col
cofactor coefmatrix coeffs coeff charpoly chain cartprod cabs c bunch
batch b-/+ b+/- b augcoefmatrix args all abs a ^^ ^ ? = ::@ / - + * %
%sqrt1 %i

e3 : show outgrammar;

e3: disp2d

e4 : show ingrammar;

e4: standard

e5 : show grammars;

e5: [scheme, null, schemepretty, standard, disp2d, tex]

Next: , Previous: , Up: Top   [Contents][Index]