### The Maxima on-line user's manual

Algebra Calculator

#### Stringout

Function: stringout (<filename>, <expr_1>, <expr_2>, <expr_3>, ...)

Function: stringout (<filename>, [<m>, <n>])

Function: stringout (<filename>, input)

Function: stringout (<filename>, functions)

Function: stringout (<filename>, values) stringout writes expressions to a file in the same form the expressions would be typed for input. The file can then be used as input for the batch or demo commands, and it may be edited for any purpose. stringout can be executed while writefile is in progress.

The global flag file_output_append governs whether stringout appends or truncates the output file. When file_output_append is true, stringout appends to the output file. Otherwise, stringout truncates the output file. In either case, stringout creates the file if it does not yet exist.

The general form of stringout writes the values of one or more expressions to the output file. Note that if an expression is a variable, only the value of the variable is written and not the name of the variable. As a useful special case, the expressions may be input labels (%i1, %i2, %i3, ...) or output labels (%o1, %o2, %o3, ...).

If grind is true, stringout formats the output using the grind format. Otherwise the string format is used. See grind and string.

The special form stringout (<filename>, [<m>, <n>]) writes the values of input labels m through n, inclusive.

The special form stringout (<filename>, input) writes all input labels to the file.

The special form stringout (<filename>, functions) writes all user-defined functions (named by the global list functions) to the file.

The special form stringout (<filename>, values) writes all user-assigned variables (named by the global list values) to the file. Each variable is printed as an assignment statement, with the name of the variable, a colon, and its value. Note that the general form of stringout does not print variables as assignment statements.

(%o1)                                true
(%i2)

### Related Examples

? stringout;

Calculate

##### stringout-values

_N:_kg*_m/_s^2;

stringout("/usr/share...

_N;

Calculate

##### stringout

[_N:_kg*_m/_s^2,_J:_N...

stringout("/usr/share...

_N;

Calculate

##### stringout-values

[_N:_kg*_m/_s^2,_J:_N...

stringout("/usr/share...

_N;

Calculate

##### stringout-values

rr:[_N:_kg*_m/_s^2,_J...

stringout("/usr/share...

_N;

Calculate

? stringout;

Calculate

##### stringout-values

_N:_kg*_m/_s^2;

stringout("/usr/share...

_N;

Calculate

##### stringout

[_N:_kg*_m/_s^2,_J:_N...

stringout("/usr/share...

_N;

Calculate

##### stringout-values

[_N:_kg*_m/_s^2,_J:_N...

stringout("/usr/share...

_N;

Calculate

##### stringout-values

rr:[_N:_kg*_m/_s^2,_J...

stringout("/usr/share...

_N;

Calculate