Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Example

  X = 'a  b  ';         /* Two blanks in each space */
  Y = ' ';              /* One blank                */
  N = length(X);        /* N = 6                 */
  I = verifyr(X,Y,N);   /* I = 4                 */

  do while (I > 0);
    display ( 'Nonblank at position ' || trim(I) );
    N = I - 1;
    I = verifyr(X,Y,N);
  end;

After the first pass through the do-loop, N=3 and VERIFYR(X,Y,N) returns 1. After the second pass, N=0, VERIFYR(X,Y,N) returns 0, and the loop ends. For another example, see SEARCHR.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)