HP Fortran Programmer Guide (766160-001, March 2014)
Bad argument exception
This exception occurs when a bad argument (for example, an out-of-range argument) is passed to
a kernel system routine. This exception can also occur in programs that make explicit calls to the
kernel threads library, /usr/lib/libpthread.sl, and pass bad arguments.
Using debugging lines
An HPFortran program that has been written in fixed source form can contain debugging lines.
These are statements that begin with the letter D or d in column 1. When compiled with the
+dlinesoption, the debugging lines are treated as statements and compiled; otherwise, they are
treated as comments and ignored. A program that contains debugging lines must also be compiled
for fixed source form; that is, the filename extension must be either .f or the program must be
compiled with the +source=fixedoption.
The +dlinesoption makes it possible to include WRITEstatements as debugging lines in the source
file and to remove them from the production version of the program without having to change
source code. Instead of deleting the WRITEstatements when you are ready to build the production
version, you recompile without the +dlinesoption, or with the +nodlines option.
Although debugging lines are supported by many implementations of Fortran (especially
FORTRAN77), it is nonstandard and therefore nonportable. Use of this feature is even more
restrictive by reason of its being incompatible with free source form. If you try to compile a Fortran90
program as free source form and the program contains debugging lines, the compilation will almost
certainly fail with syntax errors.
The C preprocessor (cpp) provides a set of directives that have the same functionality as debugging
lines but are much more powerful and can be used in either fixed or free source form. Although
the cpp directives are not part of standard Fortran 90, they are available on most UNIX systems,
such as HP-UX.
The cpp directives are described in the cpp((1)) man page. See the HPFortran Programmer’s
Reference for information about the source form of HPFortran programs and the +dlinesoption.
80 Debugging