Initializing help system before first use

XSLPqparse

XSLPqparse


Purpose
Perform a quick parse on a free-format character string, identifying where each token starts
Synopsis
int XPRS_CC XSLPqparse(char *Record, char *Token[], int NumFields);
Arguments
Record 
Character string to be parsed. Each token must be separated by one or more spaces from the next one.
Token 
Array of character pointers to receive the start address of each token.
NumFields 
Maximum number of fields to be parsed.
Return value
The number of fields processed.
Example
The following example does a quick parse of the formula "sin(x+y)" to identify where the tokens start, and then prints the first character of each token.
char *Token[20];
int i, n;

n = XSLPqparse("sin ( x + y )",Token,20);
for (i=0;i<n;i++)
  printf("\nToken[%d] starts with %c",i,Token[i][0]);
Further information

XSLPqparse does not change Record in any way. Although Token[i] will contain the address of the start of the ith token, the end of the token is still indicated by a space or the end of the record.

The return value of XSLPqparse is the number of fields processed. This will be less than NumFields if there are fewer fields in the record.



© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.