Download HP Pascal for OpenVMS Language Reference Manual

Transcript
otherwise, a range violation occurs. If omitted, the starting index defaults to
the vector’s first element.
The FIND_FIRST_BIT_SET function returns an integer value indexing the
first element containing the value 1. If no bit is 1, the result is 1 plus the
vector’s upper bound. If the vector or the indexed part of the vector has a size
of 0, the result is start-index. Consider the following example:
VAR
Boo : PACKED ARRAY [0..31] OF BOOLEAN;
{In the executable section:}
Boo::INTEGER := 128;
WRITELN( FIND_FIRST_BIT_SET( BOO ) );
For More Information:
•
On the type cast operator ( :: ) (Section 4.2.6)
8.35 FIND_MEMBER Function
The FIND_MEMBER function locates the first character in a string that is a
member of a specified set and returns an integer value indicating the position
of the character in the string; the function returns 0 if the characters in the
string were not members of the set.
FIND_MEMBER( string, char-set )
The string parameter is a string value, and char-set is a value of type SET OF
CHAR.
For More Information:
•
On string types (Section 2.6)
•
On sets (Section 2.4.3)
8.36 FIND_NONMEMBER Function
The FIND_NONMEMBER function locates the first character in a string that
is not a member of a specified set and returns an integer value indicating the
position of the character in the string; the function returns 0 if the characters
in the string were all members of the set.
FIND_NONMEMBER( string, char-set )
The string parameter is a string value, and char-set is a value of type SET OF
CHAR.
8–18 Predeclared Functions and Procedures