.\" Extracted by src2man from lib.c .\" Text automatically generated by txt2man .TH matho_process 3 "15 October 2012" "Mathomatic" "Symbolic Math Library" .SH NAME \fBmatho_process \fP- Process Mathomatic command or expression input .SH SYNOPSIS .nf .fam C int \fBmatho_process\fP(char *\fIinput\fP, char **\fIoutputp\fP); .fam T .fi .fam T .fi .SH DESCRIPTION Process a Mathomatic command or enter an expression into an equation space. The command or expression ASCII string is given as "\fIinput\fP", the resulting output string is stored in "*\fIoutputp\fP". .PP \fBmatho_init\fP(3) must have been called only one time before this to initialize the Mathomatic symbolic math engine. Use \fBmatho_clear\fP(3) as many times as you want to restart Mathomatic for the next group of operations. .PP This function works just like typing something into the Mathomatic prompt. To only parse any expression or equation and store it, use \fBmatho-parse\fP(3). .PP If this returns true (non-zero), the command or \fIinput\fP was successful, and the resulting expression output string is stored in "*\fIoutputp\fP". That is a \fBmalloc\fP()ed text string which must be \fBfree\fP()d after use to return the memory used by the string. 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 = \fB-1\fP. .PP If this returns false, the command or \fIinput\fP failed and a text error message is always stored in "*\fIoutputp\fP". The error message is a constant string and should NOT be \fBfree\fP()d. .PP Some commands, like the set command, will return no output when successful, setting "*\fIoutputp\fP" to NULL. .PP The resulting output string can safely be ignored by calling this function with "\fIoutputp\fP" set to NULL. .SH FILE lib.c