Next: Predefined names Up: Input and Output Previous: Input and Output   Contents   Index

## Input

SHASTA understands two different input formats, infix and lisp. You must choose one input format when you launch SHASTA and you cannot change the input format during a session. Use -i fmt on the command line to select the desired input format, where fmt is either infix (the default) or lisp. The startup banner informs you of the selected input format.
• The infix format is the standard FORTRAN mathematical expression format with the additional feature that you can use both ^ and for exponentiation. All statements must be terminated by a semicolon. In addition, the infix format allows SHASTA to read back the TEX that it generates, but do not expect it to understand TEX generated from anyone else, including you.
• The lisp format is the standard common LISP expression format, with the exception that the SHASTA function names are case-sensitive.
The following sample sessions show how to compute the rational kernel of the operator in both the infix and lisp formats:
```% shasta

/\
-----  it                                          /| \
\                 S H A S T A 1.0.0               / |  \
\                                               |   \  \
/                 A Sum^it server               |    |  \
/                                                /     \  \
-----                                           /      |   \
Use ^D to terminate session       /       /    \

Sum^it - Copyright (c) 1994-2002, ETH Zurich, INRIA and M.Bronstein
Algebra Library - Copyright (c) 1994-2002, ETH Zurich, INRIA and M.Bronstein
Algebra Library - Copyright (c) 1998-2002, NAG Ltd., LIFL and M.Moreno Maza
Aldor Library - Copyright (c) 1998-2002, INRIA and M.Bronstein
GMP version: must be linked with GMP (Free Software Foundation)

Input format = infix
Independent variable = n
Shift = E

1 --> L := (n+1)*(n+2)*E^2 -n*(n+1)*E -n;
0:00:00.010 (gc = 0:00:00.000)

2 --> K := kernel(L);
0:00:00.190 (gc = 0:00:00.120)
```
```% shasta -ilisp

/\
-----  it                                          /| \
\                 S H A S T A 1.0.0               / |  \
\                                               |   \  \
/                 A Sum^it server               |    |  \
/                                                /     \  \
-----                                           /      |   \
Use ^D to terminate session       /       /    \

Sum^it - Copyright (c) 1994-2002, ETH Zurich, INRIA and M.Bronstein
Algebra Library - Copyright (c) 1994-2002, ETH Zurich, INRIA and M.Bronstein
Algebra Library - Copyright (c) 1998-2002, NAG Ltd., LIFL and M.Moreno Maza
Aldor Library - Copyright (c) 1998-2002, INRIA and M.Bronstein
GMP version: must be linked with GMP (Free Software Foundation)

Input format = lisp
Independent variable = n
Shift = E

1 --> (setq L (+ (* (+ n 1) (+ n 2) (^ E 2)) (- (* n (+ n 1) E)) (- n)))
0:00:00.010 (gc = 0:00:00.000)

2 --> (setq K (kernel L))
0:00:00.190 (gc = 0:00:00.120)
```

Next: Predefined names Up: Input and Output Previous: Input and Output   Contents   Index
Manuel Bronstein 2002-09-04