02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's 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.

<strong>HP</strong> <strong>Fortran</strong> statements<br />

CHARACTER<br />

CHARACTER<br />

Declares entities of type character.<br />

Syntax<br />

CHARACTER [char-selector] [[, attrib-list] ::] entity-list<br />

char-selector specifies the length and kind of the character variable. It takes one of the<br />

following forms:<br />

262<br />

([LEN=]len-spec[, KIND=kind-param])<br />

(len-spec, [KIND=]kind-param)<br />

(KIND=kind-param[, LEN=len-spec])<br />

*len-const [,]<br />

*(len-spec[) ,]<br />

where kind-param (if specified) must be 1, the default; len-spec is either<br />

an asterisk (*) or a specification expression; and len-const is an integer<br />

constant. In the last form, len-param is enclosed in parentheses, and the<br />

optional comma may be included only if the double colon does not appear in<br />

the type declaration statement. If len-spec evaluates to a negative value, a<br />

zero-length string is declared. If len-spec is unspecified, the default is 1.<br />

attrib-list is a list of one or more of the following attributes, separated by commas:<br />

Table 10-4<br />

ALLOCATABLE INTRINSIC PRIVATE<br />

DIMENSION OPTIONAL PUBLIC<br />

EXTERNAL PARAMETER SAVE<br />

INTENT POINTER TARGET<br />

If attrib-list is present, it must be followed by the double colon. For<br />

information about individual attributes, see the corresponding statement in<br />

this chapter.<br />

entity-list is a list of entities, separated by commas. Each entity takes the form:<br />

name[(array-spec)][*len-spec][= initialization-expr]<br />

Chapter 10

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

Saved successfully!

Ooh no, something went wrong!