2. Using Solaris Studio Fortran
4. Solaris Studio Fortran Features and Differences
4.1.1 Continuation Line Limits
4.2.1.1 Rules Governing Boolean Type
4.2.1.2 Alternate Forms of Boolean Constants
4.2.1.3 Alternate Contexts of Boolean Constants
4.3.2 Purpose of Cray Pointers
4.3.3 Declaring Cray Pointers and Fortran 95 Pointers
4.3.4 Features of Cray Pointers
4.3.5 Restrictions on Cray Pointers
4.3.6 Restrictions on Cray Pointees
4.4 STRUCTURE and UNION (VAX Fortran)
4.6.1 Interoperability with C Functions
4.6.2 IEEE FloatingPoint Exception Handling
4.6.3 CommandLine Argument Intrinsics
4.6.5 Fortran 2003 Asynchronous I/O
4.6.6 Extended ALLOCATABLE Attribute
4.6.9 Fortran 2003 Formatted I/O Features
4.6.10 Fortran 2003 IMPORT Statement
4.6.11 Fortran 2003 FLUSH I/O Statement
4.6.12 Fortran 2003 POINTER INTENT Feature
4.6.13 Fortran 2003 Enhanced Array Constructor
4.6.14 Miscellaneous Fortran 2003 and Fortran 2008 Features
4.7.1 I/O Error Handling Routines
4.7.2 Variable Format Expressions
4.7.5 Miscellaneous I/O Extensions
4.8.1 Form of Special f95 Directive Lines
4.8.2 FIXED and FREE Directives
4.8.3 Parallelization Directives
4.9.2 The use=list Option Flag
5. FORTRAN 77 Compatibility: Migrating to Solaris Studio Fortran
This section describes features and extensions to the Fortran data types.
f95 supports constants and expressions of Boolean type. However, there are no Boolean variables or arrays, and there is no Boolean type statement.
For masking operations, a bitwise logical expression has a Boolean result; each of its bits is the result of one or more logical operations on the corresponding bits of the operands.
For binary arithmetic operators, and for relational operators:
If one operand is Boolean, the operation is performed with no conversion.
If both operands are Boolean, the operation is performed as if they were integers.
No userspecified function can generate a Boolean result, although some (nonstandard) intrinsics can.
Boolean and logical types differ as follows:
Variables, arrays, and functions can be of logical type, but they cannot be Boolean type.
There is a LOGICAL statement, but no BOOLEAN statement.
A logical variable, constant, or expression represents only two values, .TRUE. or .FALSE. A Boolean variable, constant, or expression can represent any binary value.
Logical entities are invalid in arithmetic, relational, or bitwise logical expressions. Boolean entities are valid in all three.
f95 allows a Boolean constant (octal, hexadecimal, or Hollerith) in the following alternate forms (no binary). Variables cannot be declared Boolean. Standard Fortran does not allow these forms.
ddddddB, where d is any octal digit
You can use the letter B or b.
There can be 1 to 11 octal digits (0 through 7).
11 octal digits represent a full 32bit word, with the leftmost digit allowed to be 0, 1, 2, or 3.
Each octal digit specifies three bit values.
The last (right most) digit specifies the content of the right most three bit positions (bits 29, 30, and 31).
If less than 11 digits are present, the value is rightjustified—it represents the right most bits of a word: bits n through 31. The other bits are 0.
Blanks are ignored.
Within an I/O format specification, the letter B indicates binary digits; elsewhere it indicates octal digits.
X’ddd’ or X"ddd", where d is any hexadecimal digit
There can be 1 to 8 hexadecimal digits (0 through 9, AF).
Any of the letters can be uppercase or lowercase (X, x, AF, af).
The digits must be enclosed in either apostrophes or quotes.
Blanks are ignored.
The hexadecimal digits may be preceded by a + or  sign.
8 hexadecimal digits represent a full 32bit word and the binary equivalents correspond to the contents of each bit position in the 32bit word.
If less than 8 digits are present, the value is rightjustified—it represents the right most bits of a word: bits n through 31. The other bits are 0.
Accepted forms for Hollerith data are:

Above, “…” is a string of characters and n is the character count.
If any character constant is in a bitwise logical expression, the expression is evaluated as Hollerith.
A Hollerith constant can have 1 to 4 characters.
Examples: Octal and hexadecimal constants.

Examples: Octal and hexadecimal in assignment statements.
i = 1357B j = X"28FF" k = X’5A’
Use of an octal or hexadecimal constant in an arithmetic expression can produce undefined results and do not generate syntax errors.
f95 allows BOZ constants in the places other than DATA statements.

If these are assigned to a real variable, no type conversion occurs.
Standard Fortran allows these only in DATA statements.
f95 allows the following nonstandard type declaration forms in declaration statements, function statements, and IMPLICIT statements. The form in column one is nonstandard Fortran, though in common use. The kind numbers in column two can vary by vendor.
Table 42 Size Notation for Numeric Data Types

Storage and alignment are always given in bytes. Values that can fit into a single byte are bytealigned.
The size and alignment of types depends on various compiler options and platforms, and how variables are declared. The default maximum alignment in COMMON blocks is to 4byte boundaries.
Default data alignment and storage allocation can be changed by compiling with special options, such as aligncommon, f, dalign, dbl_align_all, xmemalign,, and xtypemap. The default descriptions in this manual assume that these options are not in force.
There is additional information in the Fortran Programming Guide regarding special cases of data types and alignment on certain platforms.
The following table summarizes the default size and alignment, ignoring other aspects of types and options.
Table 43 Default Data Sizes and Alignments (in Bytes)

Note the following:
REAL*16 and COMPLEX*32: in 64bit environments (compiling with m64) the default alignment is on 16byte (rather than 8byte) boundaries, as indicated by 8/16 in the table. This data type is often referred to as quad precision.
Arrays and structures align according to their elements or fields. An array aligns the same as the array element. A structure aligns the same as the field with the widest alignment.
Options f or dalign force alignment of all 8, 16, or 32byte data onto 8byte boundaries. Option dbl_align_all causes all data to be aligned on 8byte boundaries. Programs that depend on the use of these options may not be portable.