Tutorial #4 VERIFYR and VERIFY 
Author Message
 Tutorial #4 VERIFYR and VERIFY

                        ---VERIFY---

The 3-argument form of the built-in function VERIFY is new
to IBM PL/I for OS/2 and AIX.

It permits the search to commence from any position within the
string.

Example:

   DECLARE String CHARACTER (10) INITIAL ('abcdefghij');
   K = VERIFY (String, 'def', 5);

will commence the search from character position 5 of String,
and will return 7 (being the first occurrence of a character
that is not one of the set d, e, and f).

                        ---VERIFYR---

The 2-argument form of VERIFYR is the same as the VERIFY
built-in function, but will search from right to left.

Example:

   K = VERIFY (String, 'HIJhij');
will return the value 7, being the first occurrence of a letter
(viz. g) that is not in the set HIJhij.

The 3-argument form of VERIFYR is like VERIFY, but will search from
right to left, commencing from a given character position.

Example,

   K = VERIFYR (String, 'def', 5);

will commence searching String from right to left, commencing
from character position 5.  It will return 3.

Code for these functions is available from:

http://www.*-*-*.com/ ~rav/VERIFY.html
______________________________________________________

[The other functions SEARCH & SEARCHR are available at

http://www.*-*-*.com/ ~rav/SEARCH.html

http://www.*-*-*.com/ ~rav/SEARCHR.html  ]



Sat, 01 Aug 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Tutorial #4: VERIFYR and VERIFY

2. The PL/I VERIFY & VERIFYR functions (re-posted)

3. VERIFYR built-in function (re-post, no change)

4. Smalltalk Books/Tutorial - Tutorial for GNU

5. awk Tutorial: Fees Reduced and Tutorial Descriptions for

6. Java Tutorial: Fees Reduced and Tutorial Descriptions for

7. Guile Tutorial: Fees Reduced and Tutorial Descriptions for

8. awk Tutorial: Fees Reduced and Tutorial Descriptions for

9. Guile Tutorial: Fees Reduced and Tutorial Descriptions for

10. Guile Tutorial: Fees Reduced and Tutorial Descriptions for

11. Verify CICS or MVS environment @ runtime

12. fun project/ help me verify my graphics project!

 

 
Powered by phpBB® Forum Software