Visual Fortran recognizes the FL32 command and many of the command-line options
provided by the Microsoft Fortran PowerStation Version 4 compiler. For more information
on command-line compatibility, see Microsoft Fortran
PowerStation Command-Line Compatibility.
Visual Fortran supports many of the language extensions to the Fortran 90 Standard supported
by Microsoft Fortran PowerStation Version 4. Certain extensions may require
the /fpscomp compiler option (also
see Categories of Compiler Options). These extensions
to the Fortran 90 Standard (and Fortran 95 Standard) include the following:
- .f, .for, .f90 source file types
- # Constants – constants using other than base 10
- C strings – NULL terminated strings
- MBCS characters in comments
- MBCS characters in string literals
- Conditional compilation and metacommand (directive) expressions
($DEFINE, $UNDEFINE, $IF, $ELSEIF, $ELSE, $ENDIF)
- !MS$ directive form (see Compiler
Directives: table)
- $FREEFORM, $NOFREEFORM, $FIXEDFORM
– source file format
- $OBJCOMMENT – place library-search
record in object file
- $INTEGER, $REAL – selects size
- $FIXEDFORMLINESIZE – line length for
fixed-form source
- $STRICT, $NOSTRICT – F90 conformance
- $ATTRIBUTES, identifier
attributes (C, STDCALL, REFERENCE, VALUE, DLLIMPORT, DLLEXPORT, EXTERN, ALIAS, VARYING)
- $PACK – structure packing
- Kind numbers match bytes – kind parameters
- AUTOMATIC attribute – automatic storage class
- Integer Pointers (Cray pointers)
- VAX Structures equivalent to Fortran 90 sequence derived types
- Mixing logicals and numerics – logicals
used with arithmetic operators and variables
- Argument matching for procedure calls
- Mixing integer kinds to intrinsics
- Byte data type equivalent to INTEGER*1
- $ATTRIBUTES [ ] Form
- $ATTRIBUTES ALIAS – external name for a subprogram
- $ATTRIBUTES C, STDCALL – calling and naming
conventions
- $ATTRIBUTES VALUE, REFERENCE – argument
passing calling conventions
- $ATTRIBUTES DLLIMPORT, DLLEXPORT – import
from/export to DLL
- Character and non-character equivalence
- Double complex data type
- .XOR. – exclusive disjunction
- Integer arguments in logical expressions
- OPEN statement specifier options:
- BLOCKSIZE= internal buffer size used in I/O
- CARRIAGECONTROL= controls the output of formatted files
- MODE= controls access to files on networked systems
- TITLE= affects and IOFOCUS= controls QuickWin
child windows
- SHARE= controls simultaneous access to files on
networked systems
- Default carriage control
- Implicit open – prompt user for filenames
- Special device names for FILE in OPEN statements
- FORM=BINARY in INQUIRE/OPEN statements
- Unformatted sequential file form
- Q edit descriptor – number of characters remaining
in the input record
- \ descriptor– prevents writing an end-of-record mark
- $ edit descriptor – suppresses the carriage return
at the end of a record
- X edit descriptor default – 1
- Ew.dDe and Gw.dDe edit descriptors – similar to Ew.dEe
and Gw.dEe
- Variable Format Expressions (VFEs) – integer expression
in FORMAT statement
- Expanded missing ,'s in FORMAT statements –
optional commas
- Expanded namelist start/end sequences
- All path names, including driver, compiler, and INCLUDE
statements are MBCS enabled [not on Windows 95]
- UNC pathnames
- Long filenames
- 7200 character statement length
- Free form infinite line length
- $DECLARE and $NODECLARE like IMPLICIT NONE
- Logical truth: 0 = false, non-zero = true
- $ATTRIBUTES EXTERN – variable allocated in another source
file
- $ATTRIBUTES VARYING – variable number of arguments
- Alternate PARAMETER syntax – no parenthesis
- $ in identifiers
- INTERFACE TO – subroutine/function prototype,
however global scoping is not supported
- Argument passing modifiers – %VAL, %REF
- Argument passing modifiers – %DESCR (treated
as %REF)
- CRAY pointer support for procedure names (for COM/OLE support)
- $ATTRIBUTES ALLOCATABLE – allocatable array
- Mixing subroutines/functions in generic interfaces
- $MESSAGE – output message during compilation
- Listing directives – $TITLE, $SUBTITLE
- STATIC attribute – static storage class
- EOF checks for end of file
- LOC equivalent to %LOC
- HFIXconverts to short integer
- INT1 converts to one byte integer by truncating
- INT2 converts to two byte integer by truncating
- INT4 converts to four byte integer by truncating
- JFIX same as INT4
- MALLOC allocates a memory block of the specified number
of bytes and returns an integer pointer to the block
- FREE frees the memory block specified by
the integer pointer
- COTAN returns cotangent
- DCOTAN returns double precision cotangent
- IMAG returns the imaginary part of complex number
- IBCHNG reverses value of bit
- ISHA shifts arithmetically left or right
- ISHC performs a circular shift
- ISHL shifts logically left or right
The following known source incompatibilities exist between Microsoft Fortran PowerStation
Version 4 and Visual Fortran:
- DATA statement style initialization in
attribute style declaration (not supported)
- Debug lines (other than D) (not supported)
- $OPTIMIZE – change optimization options (not supported)
- Listing directives – $PAGE, $PAGESIZE, $LINESIZE,
$[NO]LIST, $INCLUDE (not supported)
- $DEBUG, $NODEBUG – additional
run-time checking (not supported)
- $LINE = C's #line (not supported)
- Internal files can be any type (not supported)
- Negative I/O unit numbers (not supported)
- Interface blocks using INTERFACE [TO] at the beginning
of a source file to provide global scoping for subsequent program units (not supported)
Visual Fortran uses standard Fortran 90 semantic rules about interface block placement and
use.
- Tab continuation lines that start with characters other than
digits 1 through 9 (not supported)