mathomatic/lib/matho_parse.3

39 lines
1.4 KiB
Groff

.\" Extracted by src2man from lib.c
.\" Text automatically generated by txt2man
.TH matho_parse 3 "15 October 2012" "Mathomatic" "Symbolic Math Library"
.SH NAME
\fBmatho_parse \fP- Process Mathomatic expression or equation input
.SH SYNOPSIS
.nf
.fam C
int \fBmatho_parse\fP(char *\fIinput\fP, char **\fIoutputp\fP);
.fam T
.fi
.fam T
.fi
.SH 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 \fBmatho_process\fP(3).
.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
The \fIinput\fP and output ASCII strings are expressions, if successful.
The expression or equation string to enter is in "\fIinput\fP",
the resulting output string is stored in "*\fIoutputp\fP".
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
Works the same as \fBmatho_process\fP(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.
.PP
Returns true (non-zero) if successful.
.SH FILE
lib.c