Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Source Help

need help

A community discussion post from the original code:zIRON forum.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

need help

i need some help , when i have to use Ziron_PeekNextToken and when i have to use

Ziron_GetNextToken and also Ziron_ExpectNextToken.

also how those function affect Ziron states ?

http://www.freewebs.com/ogremagic/index.htm

Replies

Colin admin
Posts
928
Threads
49
Location
Bulgaria

ok.

Ziron_ExpectNextToken

This function will internally move to the next token and check if it is the token you passed in parameter, if it is not, it returns -1 as you already know.

Ziron_GetNextToken

This function will move to the next token, regardless of what the next token may be, it returns the zirToken ID.

Ziron_PeekNextToken

This function is similar to GetNextToken, however it is does not move to the next token, it remains in the current position as not to lose the next token if you do not need it.

Note that this function will also internally change the GetString, GetInt and GetFloat values to the peeked value.