Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>tokenend()</b> http://www.X-Hacker.org [<<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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson