HP Fortran Programmer's Reference (September 2007)

Data types and data objects
Intrinsic data types
Chapter 5 119
For compatibility with C-language syntax, HP Fortran allows the backslash character (\) as
an escape character in character strings. You must use the +escape option to enable this
feature. When this option is enabled, the compiler ignores the backslash character and either
substitutes an alternative value for the character following, or interprets the character as a
quoted value. For example:
'ISN\'T'
is a valid string when compiled with the +escape option.
The backslash is not counted in the length of the string. Also, if \& appears at the end of a line
when the +escape option is enabled, the ampersand is not treated as a continuation indicator.
Table 5-3 lists recognized escape sequences.
Logical constants
The format of a logical literal constant is:
{.TRUE.|.FALSE.}[_
kind-parameter
]
The following are examples of logical constants:
.TRUE.
.FALSE._2
Table 5-3 Escape characters
Escape character Effect
\n Newline
\t Horizontal tab
\v Vertical tab
\b Backspace
\f Form feed
\0 Null
\' Apostrophe (does not terminate a string)
\’’ Double quote (does not terminate a string)
\\ \
\
xx
, where
x
is any character other than 1