FORTRAN-80

Input/Output

A /phanumeric Editing

An 110 item matched with an 'A' or 'Aw' descriptor must have type character or be defined with Hollerith data. If the field width 'w' is specified, the field consists of 'w' characters. Otherwise, the number of characters in the field is the length of the 110 list item.

On input, if the character string is longer than the specified width, the string is trun- cated on the right. If the specified width exceeds the length of the character string, the string is blank-filled on the right. The same is true on output, except that blank filling is done on the left.

NumlJt!f Bast! Editing

A:nil1~lltit7ttiirp~t¢~~9~H~ .~. 'Bw'or':fw~?~~pr~~~Rt~tis~cpn~~sts onlyofbi~ary

()rht:x~d~cirnaldjg~ts;re~.l)ectiv7~Y'..·10,.p~rticula~,$tlpljaninput ·fi~ld cannot contain

either a sjgu ora letter indicatingthebas¢.

I··f··.O.n~."•.()(••.•tne~~.•..•4~s;ct.iptors•..·i$•.•••sP~.~i.fi.eq.·.·fo~....9.HtJrM.t#••.••;.~.'.·'·~nat~Pt¢rs.·•••are outpu t·•.io ·t~e

number~~se in~ic~ted.Leadiflk1Ter()$ar7 sup~Jie~~~9:utptltaI1Qacceptedon input, tobe~ur7 th~rear~asrn~ny.digit~·pres~:n!~~~t7n.~~pedto represent' the data . For exampletif~Fisa,~ingle-byteinn~ger wn¢se valuei~'4,' itisOlltput as 'bbb04 'under

a 'Z5'editdesctiptor.

The flum ber· hase edit descriptors can be specif\edfof tlataof any type.

6.4.3.1.2Nonrepeatable Edit Descriptors. The nonrepeatable edit descriptors are:

'hlh2··· hn'

Literal string descriptor

nHhl h2 ... hn

Hollerith string descriptor

nX

Record position control descriptor

/

Record termination descriptor

kP

Scale factor descriptor

BN

Blank descriptor

BZ

Blank descriptor

$

Alternate record termination desc:riptor

where apostrophe C), H, X, slash (I), P, BN, BZ, and the dollar sign ($) indicate the kind of editing and

his any character representable on the processor

nis a nonzero, unsigned, integer constant

kis an optionally-signed integer constant representing a scale factor

Apostrophe Editing

The apostrophe edit descriptor can be used only for output. It causes the characters enclosed in apostrophes to be written out literally. To indicate an apostrophe within the character field, show it as two consecutive apostrophes.

6-19

Page 79
Image 79
Intel fortran-80 manual Either a sjgu ora letter indicatingthebas¢, Z5editdesctiptor