1090
Appendix A: System Routines — Token Operations
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
NG_tokenize
Declaration:
BOOL
NG_tokenize
(HANDLE
hText,
SINT *
errNo,
USHORT *
offset
)
Category(ies):
Token Operations
Description:
Creates external-tokenized form from text input.
Inputs:
hText
— HANDLE of memory block that contains null terminated text
string.
errNo
— Pointer to a signed integer in which an error code can be
returned.
offset
— Pointer to an unsigned integer in which the location of the error
can be returned as an offset from the beginning of the text.
Outputs:
Pushes the external-tokenized form of the input onto the expression stack.
When no error occurs, returns TRUE and
—*
errNo
= TRUE if input represented a single algebraic expression.
—*
errNo
= FALSE if input represented a STO operation, a command, or
more than one statement.
—*
offset
is not accessed.
When an error occurs, returns FALSE and
—*
errNo
= error code.
—*
offset
= location of error as an offset from the beginning of the text.
Assumptions:
None
Side Effects:
May expand expression stack, cause heap compression, or throw an error.
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: push_parse_text
Example:
/* If h is the handle of a memory block containing the text string "x + y", then */
SINT errNo;
USHORT offset;
BOOL err;
err = NG_tokenize (h, &errNo, &offset);
/* pushes the external-tokenized form X_VAR_TAG Y_VAR_TAG ADD_TAG onto the
expression stack */