FPT and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Reference Manual Home |
Syntax:
[DO NOT] EXPAND INTERNAL SUB[-]PROGRAMS INLINE |
Function:
Internal sub-programs are expanded in-line. Declarations in the internal sub-program are moved to the containing sub-program, and the objects declared are renamed if necessary to avoid name clashes. This command may be used to convert Gould-SEL (Encore) internal sub-programs, which use a different syntax, to standard Fortran.
Where to use this command:
Operating system command line |
Yes |
|
Configuration file, config.fsp |
Yes |
|
Specification (FSP) files, *.fsp |
Yes |
|
Interactively, to FPT> prompt: |
Yes |
|
Interactive command files |
Yes |
|
Embedded in the Fortran code |
Yes |
|
Default:
Internal sub-programs are not expanded by default (Note that defaults may be changed in the configuration file).
Example:
The code fragment:
DO I=1,7 IF (A(1,I+1) .LT. A(1,I)) THEN DO J=1,8 CALL SWAP(I) ENDDO ENDIF ENDDO RETURN : INTERNAL SUBROUTINE SWAP(K) ITEMP=A(J,I) A(J,I)=A(J,I+1) A(J,I+1)=ITEMP RETURN END INTERNAL
is changed by the command:
% expand internal sub=-programs inline
to:
INTEGER*4 itemp REAL*8 a(8,8) INTEGER i,j ! DO i=1,7 IF (a(1,i+1) .LT. a(1,i)) THEN DO j=1,8 ! **************************************************************************** ! ! FPT CALL swap(i) ! itemp=a(j,i) a(j,i)=a(j,i+1) a(j,i+1)=itemp ! FPT RETURN swap ! ! **************************************************************************** ENDDO ENDIF ENDDO RETURN ! ! FPT INTERNAL SUBROUTINE swap(k) ! FPT itemp=a(j,i) ! FPT a(j,i)=a(j,i+1) ! FPT a(j,i+1)=itemp ! FPT RETURN ! FPT END INTERNAL
Note that the code of the internal sub-program is commented-out.
Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.