FORTRAN

Programs & Subroutines

Last Update : November 20, 1999


FORTRAN Programs

DISK_ERASE.FOR

FORTRAN source for erasing disk volumes under Open VMS by writing all ones, all zeros, random data or fixed 32 bit patterns to all physical blocks of a disk.

DISKERAS.TXT

Documentation for utility DISK_ERASE.FOR, including usage, restrictions, and installation instructions.

COMFILES.FOR

Program to read DCL command procedures and write out a calling tree of the DCL command procedures called with various listing options.

MAILBOX_A.FOR
MAILBOX_B.FOR

Two fortran programs that demonstrate how to use VMS mailboxes (equivalent to UNIX pipes) for interprocess communication. MAILBOX_A is a program that activates a process to run MAILBOX_B. MAILBOX_A then sends data to MAILBOX_B to be processed. When MAILBOX_B is completed with the data it sends it back to MAILBOX_A.

MAILMESS.FOR

A Quick & Dirty program to read the system VMSMAIL Profile file to list users, and the number of unread mail messages they have.


FORTRAN Subroutines/Functions

DEFLOGNAM.FOR

Subroutine to define a logical name in the calling user's process logical name table in user mode. This makes a logical name valid only for the duration of the current image being executed. When the image terminates, the logical name is removed.

DIR_VAL.FOR

Logical function that returns .TRUE. if the specified directory exists.

GET_CPUTIME.FOR

Subroutine to return the elapsed CPU time for the current calling process in 10 millisecond CPU ticks.

GET_CPU_ARCH.FOR

Subroutine to return the CPU architecture that the image is running on, VAX or Alpha.

GET_IMAGENAME.FOR

Subroutine to return the complete file specification of the current image in execution.

GET_NODENAME.FOR

Subroutine to return the current DECNET node name of the system that the current image is running on.

GET_PROCNAME.FOR

Subroutine to return the name of the current process.

GET_USERNAME.FOR

Subroutine to return the username associated with the current process.

GET_VMSDEFDIR.FOR

Subroutine to return the current default VMS directory specification with default device associated with the current process.

LENGTH.FOR

Integer Function to return the true length of a string contained within a FORTRAN CHARACTER variable.

LIMIT.FOR

Integer function to limit a value between a minimum and maximum (the missing FORTRAN numeric Intrinsic function)

SUSPEND.FOR

Subroutine to put the current process into the HIB (Hibernate) state for a given length of time. There are four integer arguments, HOURS, MINUTES, SECONDS, and Tenths of seconds.

SYS_SIGNAL.FOR

Subroutine similar to runtime library routine LIB$SIGNAL, except all FATAL ERRORS are changed into warning errors, so the calling program will not terminate on FATAL errors.

GET_PID.FOR

Subroutine to return the calls Process ID.

UPCASE.FOR

Subroutine to convert all lowercase characters in a character string to uppercase characters.

WEEKDAY.FOR

Character function to return ASCII day of the week given a standard VMS date string.

RT_ERROR.FOR

Routine to report FORTRAN Runtime IOSTAT error to a given logical unit number, or return the ASCII error message as a character string.


Number Theory

I'm starting this new section in the FORTRAN pages called Number Theory. I am quite a fan of Number Theory, and I have written several programs, in FORTRAN, that explore some of the most interesting aspects of Mathematics. If you are interested, please explore them with me.
POLYFRAC.FOR

In the August 1999 Issue of Scientific American, in the regular feature Mathematical Recreations, they explored an interesting fractal figure called Sierpinski's Gasket based on an equalatteral triangle. I had taken an interest in this from an earlier episode of NOVA on PBS, and wrote a program to generate it. I also generalized the program to generate fractals for other "n" sided regular polygons other than the triangle. Read this letter that I sent back to the editors of Scientific American, and see how the Golden Section or Golden Mean fits into this family of Fractals.


 My Home Page | VMS Home

DCL | Utilities | Management | Tips

FORTRAN | Pascal

eMail Questions

Quiz?