Scor­pio News

  

January–March 1987, Volume 1, Issue 1











Page 11 of 63











DOUBLE PRECISION types are real data with an accuracy of greater than 16 Fignificant digits with the same cenge a real date

LOGICAL types ace single byte representations of TRUE. or FALSE, with FALSE equivalent to zero and .TRUE has a value of -1; in practice, any non-zero value will be treated az TRUE. in a logical IF statement.

HOLLERITH types (named in honour of the inventor of the punched card tabulator) consist of « set. They

10 does not support COMPLEX data types, but Pi ‘A COMPLEX variable has two components – a real pert and an ieaginary part – each of type HEAL pes ipinary pes

FORTRAN constants are of types INTEGER, REAL, DOUBLE PRECISION, LOGICAL, HOLLERITH and, additionally in/F80, MEXADECIMAL,

The INTEGER type has from 1 – 5 decimal digits together with a ‘-” sign if

appropriate eg 521, 2, -45, 00022

REAL types have 7 digit precision and are represented either in floating point (F) or exponent (E) format. For example, 3.21456 is a floating point REAL Constant and 0:321456E 1 Le the exponent eqidvelent – es in BASIC the ure of the SE” indicates ‘10 co the power’ and the figure that follows is the index of the power – in this case, 1. REAL numbers can be positive or negative and must have E’decimal point. They will be truncated 1f the number of figures exceeds the

Seated Level of precision.

DOUBLE PRECISION type constants have « higher Level of precision and obey the

rules for REAL numbers – but with more Eignificant figures or the use of “D” in

the exponent format – thug 4172345860098 ie a double precision nunber as is – yeep”

LOGICAL constants are either TRUE or FALSE. and generate PF (hex) snd 0 (hex)

LITERAL constants are strings of any character except the single quote (*), enclosed by single quotes. “QWERTYUIOP” 14 one auch constant

HEXADECIMAL constants are Found in P80 but earely in other FORTRAN versions. The Constant consists of up to 4 hexadecimal digits enclosed in single quotes and preceded bys Zor X ZFAL2” and X2C” are examples.

FORTRAN variables are identified by symbolic names vhich are strings of 1 to 6 alphanam \ctere which are unique to the program in vhich they are used.

Teter (apart from the doller sign – which 19 ‘bles and runtime subprogram The restriction of mum of 8 characters is a consequence of the 8H origin

reserved for systes variable names to a 0% OF the Language.

Variables are (by default) of types denoted by the initial letter and the convention {s that integer variables have names deginning with any Lecter from T to Nand real variables begin with A. Hand O- 2 To complicate matters Slightly, a variable may explicitly be assigned to a different type by Gecfaration at the beginning of a program or subroutine “Thus START is a real variable and ISTART is an incegee variable by default, but by means of #7 explicit declaration statement!

INTEGER START REAL INPUT

variable START as an integer and INPUT as

4s described, the progra he same wey.

Feal. Double precision and Logi


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 11 of 63