Other Compatibility Routines

If you need to call a routine not listed in the portability library, you may find it in the standard Visual Fortran library. Routines implemented as intrinsic or in the DFLIB module are:

Procedure Description
AND Bitwise AND
OR Bitwise OR
XOR Bitwise XOR
FREE Frees dynamic memory
GETARG Returns command line arguments
MALLOC Allocates dynamic memory
LSHIFT Left bitwise shift
RSHIFT Right bitwise shift
EXIT Exits program with a return code

Visual Fortran does not support certain other functions, such as:

Routine Description Similar Visual Fortran Functionality
CMVGM, CMVGN, CMVGP, CMVGT, CMVGZ Conditional merge MERGE intrinsic function
FORK Creates an identical process CreateProcess, System
LINK Creates a hard link between two files none
SYMLNK Creates a symbolic link between two files none
Note: CreateProcess is a Win32 API routine described in Creating Multithread Applications.

Replace conditional merge routines with the standard Fortran 95/90 intrinsic MERGE routine, using the following arguments:

Routine Fortran 95/90 Replacement
CVMGP(tsrc, fsrc, mask) MERGE(tsrc, fsrc, mask >= 0)
CVMGM(tsrc, fsrc, mask) MERGE(tsrc, fsrc, mask < 0)
CVMGZ(tsrc, fsrc, mask) MERGE(tsrc, fsrc, mask = 0)
CVMGN(tsrc, fsrc, mask) MERGE(tsrc, fsrc, mask /= 0)
CVMGT(tsrc, fsrc, mask) MERGE(tsrc, fsrc, mask = .TRUE.)

There is no analogy to U*X file system links or soft links under Windows.

There is also no analogy to the U*X FORK routine, since FORK creates a duplicate image of the parent process which is independent from the parent process. With Windows operating systems, both parent and child processes share the same address space and share system resources. For more information on creating child processes, see Creating Multithread Applications.