24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5 Character Substrings<br />

5.1 Introduction<br />

A substring is a contiguous portion of a character entity. The substring operation selects a substring from a<br />

character entity. The resulting substring can then be treated as a character entity in itself. Substringing also<br />

allows the replacement of substrings from character entities with other character entities.<br />

5.2 Substring Names<br />

Substrings are formed by specifying a substring name. The forms of a substring name are:<br />

<br />

v( [ e1] : [ e2] )<br />

a(s [,s] ...)( [ e1] : [ e2] )<br />

where:<br />

v<br />

a(s[,s]...)<br />

e1<br />

e2<br />

is a character variable name.<br />

is a character array element name.<br />

is an integer expression identifying the leftmost character of the substring.<br />

is an integer expression identifying the rightmost character of the substring.<br />

e1 and e2 are called substring expressions. They must be such that<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!