* ForPP (fragment) If (ncol==1) {ln(1:newl0)=s2(1:l2)//ln(l1+1:l0) Do i=1, less; nw=newl0+i; ln(nw:nw)=' ' # MakeRepl=l2+1; Return }: (lrest>0) {ln(ncol:newl0)=s2(1:l2)//ln(ncol+l1:l0) Do i=1, less; nw=newl0+i; ln(nw:nw)=' ' # MakeRepl=ncol+l2; Return }: (lrest==0) {ln(ncol:newl0)=s2(1:l2); MakeRepl=0; Return }{ Msg, 'Debugging information:'; Msg, 'Current column:', ncol Msg, 'Length:', l0, ' line:', ln(1:l0) Msg, 'Length:', l1, ' pattern:', s1(1:l1) Msg, 'Length:', l2, ' substitution:', s2(1:l2); Call Dam } * FORTRAN (formatted manually for better readability) * F-77 extensions such as `End Do' used If (ncol.eq.1) Then ln(1:newl0)=s2(1:l2)//ln(l1+1:l0) Do i=1, less nw=newl0+i ln(nw:nw)=' ' End Do MakeRepl=l2+1 Return Else If (lrest.gt.0) Then ln(ncol:newl0)=s2(1:l2)//ln(ncol+l1:l0) Do i=1, less nw=newl0+i ln(nw:nw)=' ' End Do MakeRepl=ncol+l2 Return Else If (lrest.eq.0) Then ln(ncol:newl0)=s2(1:l2) MakeRepl=0 Return Else Print *, 'Debugging information:' Print *, 'Current column:', ncol Print *, 'Length:', l0, ' line:', ln(1:l0) Print *, 'Length:', l1, ' pattern:', s1(1:l1) Print *, 'Length:', l2, ' substitution:', s2(1:l2) Call Dam End IfYou may see that even FORTRAN-90 and GNU FORTRAN-77 with FORTRAN-90 features does not cover ForPP's facilities.
End of ForPP page