%VAL( IPTR )
is changed to
%VAL( CNF_PVAL( IPTR ) )
If the call to CNF_PVAL is already present no change is made, and a warning is emitted. Lines with no references to the %VAL directive are left alone.
Additionally, for each program unit in which a call to CNF_PVAL has been made, an attempt is made to insert a line like
INCLUDE 'CNF_PAR' ! For CNF_PVAL function
This is inserted after the last INCLUDE line which already exists in the program unit. If there are no INCLUDE lines there, this line is not inserted, and a warning message is printed to standard error.
Attention is paid to Fortran 77 source format, so that lines more than 72 characters long are avoided (unless they were there in the first place).
Characters 'r' (carriage return) and '
t' (tab) might possibly
cause erroneous line breaking - if any are encountered a warning
is given (these should not be in the source really).
Code using columns 73-80 of the source cards for comments is
likely to be mangled (nobody does this any more do they?).
Under certain improbable circumstances it is possible for the program to get stuck trying to break a line; in this case it will exit with error status and an error message.
Some attention is paid to the aesthetic qualities of the output: line breaks are made, where possible, following the usage in, e.g., KAPPA. An attempt is made to copy the style of case usage and bracket spacing from the input.
This program wraps ALL occurrences of %VAL in a call to CNF_PVAL, unless they are already so wrapped. If it suspects that %VAL may not be a legitimate candidate for this treatment, it will output a warning message to standard error. It will do this in the following cases: