Dan Nagle's Technical Site

Module environment

Home --> Fact Sheet --> Free Source Code -->environment

About the Module environment

Go directly to Downloads

The module environment provides some procedures from the Unix f77 environment to the Fortran 95 programmer. The intention is to ease the porting of programs from f77 compiler that supported these extensions.

This is a small module with only a few variables and procedures. They are described below.

Constants
end_of_args is returned by getopt() to signal the last arg has been returned.
unknown_option is returned by getopt() to signal that the option is not known to getopt
optarg_len is the length of the optarg character variable

Back to the Top

Variables
optarg is an argument returned by getopt().
optind is the index of the next argument to be returned by getopt()

Back to the Top

Library
abort() unconditionally ends program execution, and writes a message to the error output.
assert() mimics the assert macro, halting execution when its condition is false. The string passed to assert() may be edited by coco to include the filename and line number.
getopt() returns command line options, indicating whether an option is present in a string of options, and indicating when it reaches the end of the options.
lshift() is the unix spelling of the left shift function.
rshift() is the unix spelling of the right shift function.
cut() functions similarly to the unix cut command, retruning substrings separated by a separator character from a string.
swab() copies integers, swapping pairs of bytes as it does.

Back to the Top

Downloads

To download a source code for the environment module, click environment. Note that you will need the standard_types module and the coco preprocessor from the Portability Project in order to compile the environment module.

For more information about the Portability Porject, click here.

For more information about the coco preporcessor, click here.

Back to the Top

Please see our Fact Sheet, or E-mail me for more information.


Home - Fact Sheet - Free Source Code - Fortran Links - Email me

Back to the Top