top_left_banner  SimCon logo


fpt: Control of Continuation Lines

In modern Fortran controlling the number of continuation lines permitted in a statement is simply a matter of style. The Fortran 2023 Standard does not specify a maximum number (the total number of characters in a statement is limited to a million and this is unlikely to be a problem!). However, in migration projects it is sometimes necessary to move code backwards and forwards between the original system and the new target, and the number of continuation lines could become an issue.

The permitted number of continuation lines in standard Fortran, and in the legacy systems from which code is likely to be migrated is (or was):

FORTRAN 77 19
Fortran 90 49
Fortran 2003 255
Fortran 2023 Unlimited (1,000,000 characters)
DEC VMS Unlimited (13,200 characters)
Gould-SEL MPX Unlimited

The permitted number of continuation lines occasionally caused a problem in migration to older Fortran standards.

fpt can control the number of continuation lines in the code. It can sub-divide most declaration statements, and will attempt to squeeze executable statements into a user-selected number of lines. The command is, for example:

MAXIMUM NUMBER OF CONTINUATION LINES = 39

An error is reported if the statement cannot be fitted into the required number of lines.

Copyright ©1995 to 2025 Software Validation Ltd. All rights reserved.