Navigation:  ThinBASIC Modules > Tokenizer >

Tokenizer_GetNextToken

Previous pageReturn to chapter overviewNext page

 

Description

 

Returns the next token from a string buffer.

 

Syntax

 

pKey = Tokenizer_GetNextToken(Buffer, CurrentPosition, TokenMainType, Token [, TokenSubType])

 

Returns

 

Number.

In case token found is a user key, returned number is a pointer to user key.

 

Parameters

 

Name

Type

Optional

Meaning

Buffer

String variable

No

Buffer containing the string to be tokenized.
Parameter passed BYREF so a variable is needed and not a string expression.

CurrentPosition

Numeric variable

No

Current Tokenizer position.

Parameter passed BYREF so a variable is needed and not a numeric expression.

TokenMainType

Numeric variable

No

Token main type. See Tokenizer equates for main type reference.

Parameter passed BYREF so a variable is needed and not a numeric expression.

TokenVariable

String variable

No

Parameter passed BYREF so a variable is needed and not a string expression.

TokenSubType

Numeric variable

Yes

Token sub type. This information is relevant only for user defined keys. See Tokenizer_KeyAdd function.

Parameter passed BYREF so a variable is needed and not a numeric expression.

 

Remarks

 

Important: all parameters passed to this function must be variable and not expressions.

They must be variable because passed by reference in order to get back information.

 

Restrictions

 

See also

 

Examples