assume

Tells the compiler to make certain assumptions.

IDE Equivalent

Windows:
Compatibility > Treat Backslash as Normal Character in Strings
(/assume:[no]bscc)
Data > Assume Dummy Arguments Share Memory Locations
(/assume:[no]dummy_aliases)
Data > Constant Actual Arguments Can Be Changed
(/assume:[no]protect_constants)
Data > Use Bytes as RECL=Unit for Unformatted Files
(/assume:[no]byterecl)
Floating-Point > Enable IEEE Minus Zero Support
(/assume:[no]minus0)
Optimization > I/O Buffering
(/assume:[no]buffered_io)
Preprocessor > Default Include and Use Path
(/assume:[no]source_include)
Preprocessor > OpenMP Conditional Compilation
(/assume:[no]cc_omp)
External Procedures > Append Underscore to External Names
(/assume:[no]underscore)
Linux: None

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux: -assume keyword
Windows:  /assume:keyword

Arguments

keyword     Specifies the assumptions to be made. Possible values are:
  none Disables all assume options.
  [no]bscc Determines whether the backslash character is treated as a C-style control character syntax in character literals.
  [no]buffered_io Determines whether data is immediately written to disk or accumulated in a buffer.
  [no]byterecl Determines whether units for the OPEN statement RECL specifier (record length) value in unformatted files are in bytes or longwords (four-byte units).
  [no]cc_omp Determines whether conditional compilation as defined by the OpenMP Fortran API is enabled or disabled.
  [no]dummy_aliases Determines whether the compiler assumes that dummy arguments to procedures share memory locations with other dummy arguments or with COMMON variables that are assigned.
  [no]minus0 Determines whether the compiler uses Fortran 95 or Fortran 90/77 standard semantics in the SIGN intrinsic when treating -0.0 and +0.0 as 0.0, and how it writes the value on formatted output.
  [no]protect_constants Determines whether a constant actual argument or a copy of it is passed to a called routine.
  [no]source_include Determines whether the compiler searches for USE modules and INCLUDE files in the default directory or in the directory where the source file is located.
  [no]underscore Determines whether the compiler appends an underscore character to external user-defined names.
  [no]2underscores
(Linux only)
Determines whether the compiler appends two underscore characters to external user-defined names.

Default

nobscc The backslash character is treated as a normal character in character literals.
nobuffered_io Data in the internal buffer is immediately written (flushed) to disk (OPEN specifier BUFFERED='NO').
If you set the FORT_BUFFERED environment variable to true, the default is assume buffered_io.
nobyterecl Units for OPEN statement RECL values with unformatted files are in four-byte (longword) units.
nocc_omp Conditional compilation as defined by the OpenMP Fortran API is disabled unless option -openmp (Linux) or /Qopenmp (Windows) is specified.
If compiler option -openmp (Linux) or /Qopenmp (Windows) is specified, the default is assume cc_omp.
nodummy_aliases Dummy arguments to procedures do not share memory locations with other dummy arguments or with variables shared through use association, host association, or common block use.
nominus0 The compiler uses Fortran 90/77 standard semantics in the SIGN intrinsic to treat -0.0 and +0.0 as 0.0, and writes a value of 0.0 with no sign on formatted output.
protect_constants A constant actual argument is passed to a called routine. Any attempt to modify it results in an error.
source_include The compiler searches for USE modules and INCLUDE files in the directory where the source file is located.

Windows: nounderscore
Linux: underscore

On Windows systems, the compiler does not append an underscore character to external user-defined names. On Linux systems, the compiler appends an underscore character to external user-defined names.

no2underscores
(Linux only)
The compiler does not append two underscore characters to external user-defined names that contain an embedded underscore.

Description

This option specifies assumptions to be made by the compiler.

Option

Description

assume none Disables all the assume options.
assume bscc Tells the compiler to treat the backslash character (\) as a C-style control (escape) character syntax in character literals. The "bscc" keyword means "BackSlashControlCharacters."
assume buffered_io Tells the compiler to accumulate records in a buffer. This sets the default for opening sequential output files to BUFFERED='YES', which also occurs if the FORT_BUFFERED run-time environment variable is specified.

When this option is specified, the internal buffer is filled, possibly by many record output statements (WRITE), before it is written to disk by the Fortran run-time system. If a file is opened for direct access, I/O buffering is ignored.

Using buffered writes usually makes disk I/O more efficient by writing larger blocks of data to the disk less often. However, if you request buffered writes, records not yet written to disk may be lost in the event of a system failure.

The OPEN statement BUFFERED specifier applies to a specific logical unit. In contrast, the assume [no]buffered_io option and the FORT_BUFFERED environment variable apply to all Fortran units.

assume byterecl Specifies that the units for the OPEN statement RECL specifier (record length) value are in bytes for unformatted data files, not longwords (four-byte units). For formatted files, the RECL value is always in bytes.

If a file is open for unformatted data and assume byterecl is specified, INQUIRE returns RECL in bytes; otherwise, it returns RECL in longwords. An INQUIRE returns RECL in bytes if the unit is not open.

assume cc_omp Enables conditional compilation as defined by the OpenMP Fortran API. That is, when "!$space" appears in free-form source or "c$spaces" appears in column 1 of fixed-form source, the rest of the line is accepted as a Fortran line.
assume dummy_aliases Tells the compiler that dummy (formal) arguments to procedures share memory locations with other dummy arguments (aliases) or with variables shared through use association, host association, or common block use.

Specify the option when you compile the called subprogram. The program semantics involved with dummy aliasing do not strictly obey the Fortran 95/90 standards and they slow performance, so you get better run-time performance if you do not use this option.

However, if a program depends on dummy aliasing and you do not specify this option, the run-time behavior of the program will be unpredictable. In such programs, the results will depend on the exact optimizations that are performed. In some cases, normal results will occur, but in other cases, results will differ because the values used in computations involving the offending aliases will differ.

assume minus0 Tells the compiler to use Fortran 95 standard semantics for the treatment of the IEEE* floating value -0.0 in the SIGN intrinsic, which distinguishes the difference between -0.0 and +0.0, and to write a value of -0.0 with a negative sign on formatted output.
assume noprotect_constants Tells the compiler to pass a copy of a constant actual argument. This copy can be modified by the called routine, even though the Fortran standard prohibits such modification. The calling routine does not see any modification to the constant.
assume nosource_include Tells the compiler to search the default directory for module files specified by a USE statement or source files specified by an INCLUDE statement.
assume underscore Tells the compiler to append an underscore character to external user-defined names: the main program name, named common blocks, BLOCK DATA blocks, global data names in MODULEs, and names implicitly or explicitly declared EXTERNAL. The name of a blank (unnamed) common block remains _BLNK__, and Fortran intrinsic names are not affected.
assume 2underscores
(Linux only)
Tells the compiler to append two underscore characters to external user-defined names that contain an embedded underscore: the main program name, named common blocks, BLOCK DATA blocks, global data names in MODULEs, and names implicitly or explicitly declared EXTERNAL. The name of a blank (unnamed) common block remains _BLNK__, and Fortran intrinsic names are not affected.

This option does not affect external names that do not contain an embedded underscore. By default, the compiler only appends one underscore to those names. For example, if you specify assume 2underscores for external names my_program and myprogram, my_program becomes my_program__, but myprogram. becomes myprogram_.

Alternate Options

assume nobscc Linux: -nbs
Windows: /nbs
assume dummy_aliases  Linux: -common-args
Windows: /Qcommon-args
assume underscore Linux: -us
Windows: /us
assume nounderscore Linux: -nus
Windows: None