File: config.chapt.txt

package info (click to toggle)
yacas 1.3.6-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 7,176 kB
  • ctags: 3,520
  • sloc: cpp: 13,960; java: 12,602; sh: 11,401; makefile: 552; perl: 517; ansic: 381
file content (216 lines) | stat: -rw-r--r-- 5,312 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
			Running Yacas off-line

		Interactive session commands

*INTRO
This section describes the special commands for the Yacas interactive sessions (for example, to restart or to exit the interpreter).
These commands are not functions but special directives that only apply while running Yacas interactively.
They should not be used in scripts.



*CMD quit --- stop Yacas from running, from the command line
*CMD restart --- restart Yacas (to start with a clean slate)
*CORE
*CALL
	quit
	restart

*DESC

Type {quit} or {restart} at the Yacas prompt to exit or to restart the interpreter.

The directives {quit} and {restart} are <i>not</i> reserved words or variable names.
They take effect only when typed as first characters at a prompt.

Pressing {Ctrl-C} will stop the currently running calculation.
If there is no currently running calculation, {Ctrl-C} will quit the interpreter.

When the interpreter quits, it saves the command history
(so quitting by {Ctrl-C} does not mean a "crash").

*E.G.

To be effective, the directive must be typed immediately after the prompt:
	In> quit
	Quitting...
We can use variables named {quit}:
	In> 1+quit
	Out> quit+1;
There is no effect if we type some spaces first: 
	In>       restart
	Out> restart;

*SEE Exit

		Command-line options

*A options
*INCLUDE cl-options.chapt


			Startup configuration

*INTRO
Yacas allows you to configure a few things at startup. The file
{~/.yacasrc} is written in the Yacas language and
will be executed when Yacas is run. The
following functions can be useful in the {~/.yacasrc} file.

*CMD DefaultDirectory --- add directory to path for Yacas scripts
*CORE
*CALL
	DefaultDirectory(path)

*PARMS

{path} -- a string containing a full path where yacas script files reside

*DESC

When loading files, yacas is also allowed to
look in the folder "path". {path} will be prepended
to the file name before trying to load the file.
This means that "path" should end with a forward slash (under Unix-like
operating systems).

Yacas first tries to load a file from the current
directory, and otherwise it tries to load from
directories defined with this function, in the
order they are defined. Note there will be at least one directory
specified at start-up time, defined during compilation. This
is the directory Yacas searches for the initialization scripts
and standard scripts.

*E.G.

	In> DefaultDirectory("/home/user/myscripts/");
	Out> True;

*SEE Load, Use, DefLoad, FindFile


*CMD PrettyPrinter'Set --- set routine to use as pretty-printer
*CMD PrettyPrinter'Get --- get routine to use as pretty-printer

*STD

*CALL
	PrettyPrinter'Set(printer)
	PrettyPrinter'Set()
	PrettyPrinter'Get()

*PARMS

{printer} -- a string containing the name of a function that can "pretty-print" an expression.


*DESC

This function sets up the function printer to print out the results on
the command line. This can be reset to the internal printer with {PrettyPrinter'Set()} (when no argument is given, the system returns to the default).

Currently implemented prettyprinters are: {PrettyForm}, {TeXForm}, {Print}, {OMForm}, {CForm} and {DefaultPrint}.

{PrettyPrinter'Get()} returns the current pretty printer, or it returns
an empty string if the default pretty printer is used.

*E.G.

	In> Taylor(x,0,5)Sin(x)
	Out> x-x^3/6+x^5/120;
	In> PrettyPrinter'Set("PrettyForm");
	
	True
	
	In> Taylor(x,0,5)Sin(x)
	
	     3    5
	    x    x
	x - -- + ---
	    6    120
	
	In> PrettyPrinter'Set();
	Out> True;
	In> Taylor(x,0,5)Sin(x)
	Out> x-x^3/6+x^5/120;

*SEE PrettyForm, Write, TeXForm, CForm, OMForm, PrettyReader'Set, PrettyReader'Get




*CMD PrettyReader'Set --- set routine to use as pretty-reader
*CMD PrettyReader'Get --- get routine that is currently used as pretty-reader

*STD

*CALL
	PrettyReader'Set(reader)
	PrettyReader'Set()
	PrettyReader'Get()

*PARMS

{reader} -- a string containing the name of a function that can read an expression from current input.


*DESC

This function sets up the function reader to read in the input on
the command line. This can be reset to the internal reader with {PrettyReader'Set()} (when no argument is given, the system returns to the default).

Currently implemented PrettyReaders are: {LispRead}, {OMRead}.

{PrettyReader'Get()} returns the current reader, or it returns
an empty string if the default pretty printer is used.

*E.G.

	In> Taylor(x,0,5)Sin(x)
	Out> x-x^3/6+x^5/120
	In> PrettyReader'Set("LispRead")
	Out> True
	In> (Taylor x 0 5 (Sin x))
	Out> x-x^3/6+x^5/120

*SEE Read, LispRead, OMRead, PrettyPrinter'Set, PrettyPrinter'Get




*CMD MaxEvalDepth --- set depth of recursion stack
*CORE
*CALL
	MaxEvalDepth(n)
*PARMS
{n} -- integer
*DESC
Sets the maximum depth of recursive function call. An error message is printed when too many recursive calls are executed, and this function can be used to increase or decrease the limit as necessary.



*CMD HistorySize --- set size of history file
*CORE
*CALL
	HistorySize(n)

*PARMS

{n} -- number of lines to store in history file

*DESC

When exiting, yacas saves the command line history to a
file {~/.yacas_history}. By default it will
save the last 1024 lines. The default can be
overridden with this function. Passing -1 tells the system to save <i>all</i>
lines.

*E.G.

	In> HistorySize(200)
	Out> True;
	In> quit

*SEE quit