*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> ftnsplit (1)              


FTNSPLIT(1)					      Last changed: 7-24-97

NAME    [Toc]    [Back]

     ftnsplit -	Invokes	the Fortran file splitter

SYNOPSIS    [Toc]    [Back]

     ftnsplit [-a] [-d]	[-k] [-m] [-o] [-r] [-s] [-u] [-x] [files]

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

DESCRIPTION    [Toc]    [Back]

     The ftnsplit utility splits named Fortran files into separate files,
     with one unit per file, and lists the resultant files.  Each unit
     includes the following program segments:  blockdata, function, main
     program, module, and subroutine.  If you do not specify files, data is
     read from standard	input (stdin).

     The following naming conventions apply:

     * The segment X is	put in file X.f	or file	X.f90.	ftnsplit preserves
       the file	extension of the original file.

     * Duplicate segments X are	put into file Xn.f[90],	where n	represents
       a unique	integer	value for each duplicate file that exists.  The	-r
       option overrides	this convention	and replaces the file X.f[90].

     * Unnamed blockdata segments are put into files blockdataN.f.

     The ftnsplit utility accepts the following	options:

     -a	  Lists	file-based dependencies, that is, those	external module
	  files	and include files, which if modified would require
	  recompilation	of the current file.

     -d	  Creates a subdirectory (inputfile.d) for each	input file and
	  creates the required output files within that	subdirectory.

     -k	  Keeps	any created CIFs.

     -m	  Lists	include	files referenced and modules used.  See	the
	  EXAMPLES section of this man page for	sample output produced by
	  using	the -m option.

     -o	  Specifies compiler options for creating compiler information
	  files	(CIFs).

     -r	  Replaces existing .f files as	required.  Creates a file named
	  unit001.f if file unit.f already exists.

     -s	  Strips trailing blanks from the generated output files.

     -u	  Specifies that make unit file	names are in uppercase characters.
	  Default is lowercase characters.

     -x	  Lists	units; source is not expanded.

	  Specifies names of files to be split.	 Default is stdin.

NOTES    [Toc]    [Back]

     The .f suffix is used to name files generated by ftnsplit.	 If a #
     character appears in column one of	an input file, the suffix used to
     name the output file will be .F, indicating that the preprocessor must
     be	executed on the	output file.

     The ftnsplit utility uses the Fortran 90 compiler to produce CIFs in
     order to generate output.

     The operation of ftnsplit may be verified using cat(1) to send the
     output files to wc(1) and comparing the result to the size	of the
     input file	to ftnsplit.

     If	you use	the !dir$ free directive to indicate free-source format
     within the	body of	the source code, then this directive will have to
     be	hand duplicated	into each of the split-out files.  For example:


	  !dir$	free
	  program main
	  print	*, "main"
	  end program main

	  subroutine test
	  print	*, "test"
	  end subroutine test

     When ftnsplit is used, compiling the resulting test.f file	will
     produce compilation errors	unless !dir$ free is added to the top of
     the file.	Alternatively, you can use ftnmgen -f"-freeform" (on IRIX
     systems) or ftnmgen -f"-ffree" (on	UNICOS systems)	to instruct the
     compiler to assume	free-form source.

EXAMPLES    [Toc]    [Back]

     The following example shows sample	program	fred and the output
     returned when the -m option is used as an argument	to the ftnsplit

	  program fred
	  include "abc.h"
	  end program fred
	  subroutine jim
	  use harry
	  end subroutine jim

	  % ftnsplit -m	file.f
	     module harry

FILES    [Toc]    [Back]

     file*.[fF][90]	 Fortran source	code files of a	named program

     blockdata*.[fF]	 Source	code files of a	blockdata segment

SEE ALSO    [Toc]    [Back]

     cat(1), csplit(1),	expand(1), f90(1), split(1), wc(1)

     This man page is available	only online.
[ Back ]
 Similar pages
Name OS Title
ftnmgen IRIX Invokes the Fortran makefile generator
runcord Tru64 invokes cord to rearrange procedures in an executable file to facilitate better cache mapping
fpr NetBSD print Fortran file
uconv IRIX convert FORTRAN unformatted file
extcentry IRIX extract FORTRAN-callable entry points from a C file
fsplit OpenBSD split a multi-routine Fortran file into individual files
cedit Tru64 Invokes the UDC Manager utility
Uil HP-UX Invokes the UIL compiler from within an application
Uil Tru64 Invokes the UIL compiler from within an application
ladebug Tru64 Invokes the Ladebug debugger
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service