From m204wiki
Revision as of 15:34, 18 August 2014 by JAL (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $Words function returns the number of words in a specified string, delimited by a blank or optionally specified character.


The format of the $Words function is:

$Words('inputstring', ['delimiter'])


  • inputstring is the input from which the specified word is to be extracted. inputstring can be a quoted literal or a %variable.
  • delimiter is an optional character to be used as a delimiter in parsing the input string into words. If delimiter is not specified, it defaults to a blank space.


Null values between delimiters are not considered words. For example,


returns a count of three words, not four.


The following function returns 4, the number of words in the string when a blank delimits a word:

$words ('NOW IS THE TIME')