[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 TOKENSEP()
 Provides the separator before or after the token most recently retrieved by
 TOKEN()
------------------------------------------------------------------------------
 Syntax

     TOKENSEP([<lMode>]) --> cDelimiter

 Argument

     <lMode>  Designates which delimiter is returned.  When this
     parameter is specified as .T., the function returns the delimiter after
     the most recently retrieved token.  The default value (.F.) specifies
     that the delimiter before the token most recently retrieved is returned.

 Returns

     The return string is the delimiter found directly before the token most
     recently retrieved.  If there is no delimiting character present at the
     beginning or end of a character string, the function returns a null
     string.

 Description

     When mathematical expressions are broken down, the delimiting characters
     are of great interest.  TOKENSEP() is always concerned with the most
     recently retrieved token determined by the TOKEN() function.  Using the
     <lMode> parameter, you can specify whether the delimiter returned is the
     one before or after the token most recently retrieved.

 Notes

     .  The TOKENSEP() function cannot be used in conjunction with
        TOKENINIT() or TOKENNEXT().  Delimiters can be determined using
        TOKENAT() in conjunction with the original string (status of
        TOKENINIT()).

     .  To find the delimiter position before the last token, set
        TOKENAT() to -1.  To find the delimiter position after the last
        token, set TOKENAT to .T..

 Examples

     .  In this example, there are delimiters before and after the
        last token:

        ? TOKEN("Hello, World!")            // Last token: "World"
        ? TOKENSEP()                        // Leading separator: ","
        ? TOKENSEP(.T.)                     // Trailing separator: "!"

     .  This example shows how to force a token to include the
        delimiter immediately before it (the wrong setting):

        ? TOKENSEP() + TOKEN("32+45*70", "+-*/", 2)    // "45"

     .  TOKEN() must be executed prior to TOKENSEP().  Notice the
        additional parenthesis:

        ? TOKENSEP() + (TOKEN("32+45*70", "+-*/",2)    // "+45"


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