fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

WRITE BARS AROUND NEW DECLARATIONS

Syntax:

[DO NOT] WRITE BARS AROUND NEW DECLARATIONS

Function:

Many fpt commands result in the creation of new symbols which must be declared. Other commands cause fpt to insert new declarations for existing symbols. This command instructs fpt to write separator comment lines before and after blocks of new declarations.

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

Separator lines are written by default. They are suppressed by the command DO NOT WRITE BARS AROUND NEW DECLARATIONS.

Example

The program:

PROGRAM t_bars WRITE(*,'("x: ",$)') READ(*,*)x WRITE(*,'("y: ",$)') READ(*,*)y r = SQRT(x*x+y*y) WRITE(*,'("r: ",F12.3)')r END PROGRAM t_bars

is processed by fpt to enforce IMPLICIT NONE with the fsp file:

! t_bars.fsp % primary input file name extension: ".f90" % output directory ./fpt_output FPTMAIN:free_format.fsp % change data sizes to kinds % overwrite changed files % specify implicit none ! Suppress marking of new declarations % suppress diagnostic 2255 4243 t_bars.f90 ! End of t_bars.fsp

There is no specification for bar separator lines and the default behaviour is to add them. The output is:

!H!**************************************************************************** !H! File: ./fpt_output/t_bars.fpt !H! Output by fpt 4.1-rB Intel-Linux On 8-AUG-22 At 17:55:22 Input files: !H! Main: /home/john/projects/WinFPT/fpt/fpttest/t_bars.fsp !H! Current: /home/john/projects/WinFPT/fpt/fpttest/t_bars.f90 !H! Licensee: SimCon: Development version. !H!**************************************************************************** PROGRAM t_bars ! ! **************************************************************************** ! ! USE fpt_module_kinds ! IMPLICIT NONE REAL(KIND = kr4)r REAL(KIND = kr4)x REAL(KIND = kr4)y ! ! **************************************************************************** ! WRITE (*,'("x: ",$)') READ (*,*)x WRITE (*,'("y: ",$)') READ (*,*)y r = SQRT(x*x+y*y) WRITE (*,'("r: ",F12.3)')r END PROGRAM t_bars

The module fpt_module_kinds defines the kind value, in this case, kr4.

If writing of separator bars is suppressed, as in the fsp file:

! t_bars.fsp % primary input file name extension: ".f90" % output directory ./fpt_output FPTMAIN:free_format.fsp % change data sizes to kinds % overwrite changed files % do not write bars around new declarations % specify implicit none ! Suppress marking of new declarations % suppress diagnostic 2255 4243 t_bars.f90 ! End of t_bars.fsp

the fpt output is then:

!H!**************************************************************************** !H! File: ./fpt_output/t_bars.fpt !H! Output by fpt 4.1-rB Intel-Linux On 8-AUG-22 At 17:59:52 Input files: !H! Main: /home/john/projects/WinFPT/fpt/fpttest/t_bars.fsp !H! Current: /home/john/projects/WinFPT/fpt/fpttest/t_bars.f90 !H! Licensee: SimCon: Development version. !H!**************************************************************************** PROGRAM t_bars ! USE fpt_module_kinds ! IMPLICIT NONE ! REAL(KIND = kr4)r REAL(KIND = kr4)x REAL(KIND = kr4)y WRITE (*,'("x: ",$)') READ (*,*)x WRITE (*,'("y: ",$)') READ (*,*)y r = SQRT(x*x+y*y) WRITE (*,'("r: ",F12.3)')r END PROGRAM t_bars

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