[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 TOKENEND()
 Determines if more tokens are available in TOKENNEXT()
------------------------------------------------------------------------------
 Syntax

     TOKENEND() --> lEndToken

 Returns

     TOKENEND() returns .T. after the last token has been queried with
     TOKENNEXT().

 Description

     Reviewing the return value of TOKENNEXT(), as the final condition for
     tokenizing, is not always definitive.  The end of one cycle is shown
     here as a null string, which is returned just like an "empty" token
     (empty line).

     By contrast, TOKENEND() always returns definite information if there are
     more tokens to be returned by TOKENNEXT().  This makes TOKENEND() ideal
     for use as a loop condition.

 Example

     Break up text into individual lines.  The text is initialized so that
     two consecutive (3. Parameter) CR/LF sequences return a null string:

     TOKENINIT(TextString, CHR(13) + CHR(10), 2)

     DO WHILE .NOT. TOKENEND()
        Line  :=  TOKENNEXT(TextString)

        ? "Line - " + Line
     ENDDO


See Also: TOKENINIT() TOKENNEXT()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson