Announcement

Collapse
No announcement yet.

PARSECOUNT wrong?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Joe Speroni
    replied
    Sorry I raised it, Lance. The documentation is unambiguous.

    The examples in the manual for PARSECOUNT
    should be fixed; they are the same as for
    the PARSE$ function and obviously wrong.

    Leave a comment:


  • Lance Edmonds
    replied
    Code:
    TEXT$="AAAA"
    PRINT PARSECOUNT(TEXT$,"A")
    This will return 5, because there are 4 "separators" which means that there are 5 "fields", hence PARSECOUNT will correctly return 5.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Joe Speroni
    started a topic PARSECOUNT wrong?

    PARSECOUNT wrong?

    The PARSECOUNT function seems to give a
    result 1 too large in the following program.
    Is this a known problem or simply a
    definition error in the documentation?
    ---------------------------------------------
    #COMPILE EXE
    FUNCTION PBMAIN() AS LONG
    TEXT$="AAAA"
    PRINT PARSECOUNT(TEXT$,"A")
    PRINT PARSECOUNT(TEXT$,"B")
    PRINT PARSECOUNT(TEXT$,"")
    END FUNCTION
Working...
X