HP Fortran Programmer's Reference (September 2007)

Data types and data objects
Intrinsic data types
Chapter 5118
Following are examples of real constants:
3.4E-4 !0.00034
42.E2 !4200
1.234_8 !1.234 with approximately 15 digits precision
-2.53Q-300 !-2.53 x 10 to the -300th, with approximately 34
! digits precision
Complex constants
A complex literal constant has the form:
(
real-part
,
imaginary-part
)
real-part
and
imaginary-part
are each one of:
signed-integer-literal-constant
signed-real-literal-constant
The kind parameter of the complex value corresponds to the kind parameter of the part with
the larger storage requirement.
Following are examples of complex constants:
(1.0E2, 2.3E-2) !default complex value
(3.0_8,4.2_4) !complex value with KIND=8
Character constants
A character literal constant is one of:
[
kind-parameter
_]'
character-string
'
[
kind-parameter
_]"
character-string
"
The delimiting characters are not part of the constant. If you need to place a single quote in a
string delimited by single quotes, use two single quotes; the same rule applies for double
quotes.
Following are examples of character constants:
1_'A.N.Other'
'Bach''s Preludes' ! actual constant is: Bach's Preludes
"" ! a zero length constant