Converting giac expressions to strings

### 25.5.5 Converting giac expressions to strings

The string command converts an expression to a string.

- string takes expr, an expression.
- string(expr) evaluates expr then converts it to a string.

#### Examples

string(ifactor(6))

“2*3” |  |  |  |  |  |  |  |  |  |

This is the same thing as entering ifactor(6)+"", i.e. adding the empty string to the expression.

If you want to convert an unevaluated expression to a string, you can quote the expression (see Section 9.1.4):

string(quote(ifactor(6)))

“ifactor(6)” |  |  |  |  |  |  |  |  |  |