matho_parse(3)

NAME
matho_parse - Process Mathomatic expression or equation input

SYNOPSIS
int matho_parse(char *input, char **outputp);

DESCRIPTION
Parse a mathematical equation or expression and store in the next available equation space, making it the current equation. Afterwards, it can be operated on by Mathomatic commands using matho_process(3).

matho_init(3) must have been called only one time before this to initialize the Mathomatic symbolic math engine. Use matho_clear(3) as many times as you want to restart Mathomatic for the next group of operations.

The input and output ASCII strings are expressions, if successful. The expression or equation string to enter is in "input", the resulting output string is stored in "*outputp". The equation number of the equation space that the output expression is additionally stored in (if any) is available in the global "result_en", otherwise result_en = -1.

Works the same as matho_process(3), except commands are not allowed, so that variables are not ever confused with commands. In fact, this function is currently set to only allow entry and storage of expressions and equations.

Returns true (non-zero) if successful.

FILE
lib.c