Tokenizer_KeyAdd

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > Tokenizer >

Tokenizer_KeyAdd

 

Description

 

Add a user defined keys to Tokenizer engine.

 

Syntax

 

pKey = Tokenizer_KeyAdd(sKey, KeyMainType, KeySubType [, UserString1 [, UserString2 ... [, UserString10]]] )

 

Returns

 

Number

Returned data is a pointer to the newly added key structure. It can be used to add or retrieve info to/from the key.

 

Parameters

 

Name

Type

Optional

Meaning

sKey

String

No

New keyword name

KeyMainType

Numeric

No

Main type. Main type MUST start from 100 included. Main types from 0 to 99 are reserved.

KeySubType

Numeric

No

Sub type. Can be any positive or negative long integer class value.

UserString1

String

Yes

An optional string information to add to key in order to store additional data.

To retrieve this string use

...

String

Yes

...

UserString10

String

Yes

Up to 10 user string data can be indicated

 

Remarks

 

KeyMainType can be used to add new keys keeping them grouped under a common group.

KeySubType can be used to distinguish keys having the same KeyMainType.

 

Restrictions

 

See also

 

Examples