NotAtEnd (StringTokenizer function)

From m204wiki
Revision as of 03:06, 16 December 2010 by 198.242.244.228 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Is present tokenizing position at end of tokenizer string?

NotAtEnd is a member of the StringTokenizer class.

This method returns a Boolean value that indicates whether or not the present tokenizing position is after the last token in the tokenizer string. The value is True if the position is not after the last token; otherwise it is False.

The tokenizing position is given by NextPosition.

Syntax

  %bool = %tok:NotAtEnd

Syntax terms

%bool
An enumeration object of type Boolean to contain the returned value of NotAtEnd. For more information about Boolean enumerations, see Using Boolean enumerations.
%tok
A StringTokenizer object variable.

Usage Notes

  • The tokenizing position may be after the last token but not necessarily at the end of the token string. In the following code sequence, the return from NotAtEnd is True and the position is not at the end of the string:
        %tok:string = 'example      '
        %tok:nextPosition = 10
        %tok:notAtEnd
    
  • AtEnd is the reverse of NotAtEnd: it returns a value of False if the current tokenizing position is not at the end of the string.