FILUM - File Utilities
FILUM is a small set of utility routines for working with
information in text files.
Files you may copy include:
-
filum.f90, the source code;
-
filum_prb.f90, the calling program;
-
filprb_4by5.txt, a file with
missing right parentheses.
-
filprb_test.txt, a sample file.
-
filprb_append.txt, an example of
FILE_APPEND.
-
filprb_copy.txt, an example of
FILE_COPY.
-
filprb_reverse_columns.txt,
an example of FILE_REVERSE_COLUMNS.
-
filprb_parens1.txt, a file with
missing right parentheses.
-
filprb_parens2.txt, a file with
illegally occurring right parentheses.
-
filprb_parens3.txt, a file
with balanced and legal parentheses.
-
filprb_reverse_rows.txt,
an example of FILE_REVERSE_ROWS.
-
filum_prb.out, the sample output.
-
merger.f90 can merge two sorted files.
The list of routines includes:
-
CH_CAP capitalizes a single character.
-
CH_EQI is a case insensitive comparison of two characters for equality.
-
CH_IS_DIGIT returns .TRUE. if a character is a decimal digit.
-
CH_LOW lowercases a single character.
-
CH_SWAP swaps two characters.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
DIGIT_INC increments a decimal digit.
-
DIGIT_TO_CH returns the character representation of a decimal digit.
-
FILE_ADVANCE_TO_STRING searches ahead in a text file for a string.
-
FILE_APPEND allows a user to append new information to an old file.
-
FILE_CHAR_COUNT counts the number of characters in a file.
-
FILE_COLUMN_COUNT counts the number of columns in the first line of a file.
-
FILE_COLUMN_RANGE determines the minimum and maximum ranges of each column.
-
FILE_COPY makes a copy of a file.
-
FILE_DELETE deletes a named file if it exists.
-
FILE_EXIST reports whether a file exists.
-
FILE_GET_NEXT_WORD returns the next word and trailing context from a file.
-
FILE_INSERT copies the contents of an input file into an output file.
-
FILE_LINE_COUNT counts the number of lines in a file.
-
FILE_LINE_GET gets a particular line of a file.
-
FILE_MERGE merges two sorted files into a third.
-
FILE_NAME_EXT_GET determines the "extension" of a file name.
-
FILE_NAME_EXT_SWAP replaces the current "extension" of a file name.
-
FILE_NAME_INC generates the next filename in a series.
-
FILE_PARA_COUNT counts the number of paragraphs in a file.
-
FILE_PAREN_CHECK checks a file for generalized parenthesis errors.
-
FILE_PRINT prints the contents of a text file.
-
FILE_REVERSE_ROWS makes a copy of a file with the lines in reverse order.
-
FILE_REVERSE_COLUMNS makes a copy of a file with each lines reversed.
-
FILE_TAG_CHECK checks a file for generalized parenthesis errors.
-
FILE_UNIQUE makes a copy of the unique lines of a sorted file.
-
FILE_WORD_COUNT counts the number of words in a file.
-
GET_UNIT returns a free FORTRAN unit number.
-
LEN_NONNULL returns the length of a string up to the last non-null character.
-
NUMBER_INC increments the integer represented by a string.
-
S_EQI is a case insensitive comparison of two strings for equality.
-
S_INDEX_LAST finds the LAST occurrence of a given substring.
-
S_LOW replaces all uppercase letters by lowercase ones.
-
S_REVERSE reverses the characters in a string.
-
S_TO_R reads a real number from a string.
-
S_TO_RVEC reads a real vector from a string.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
WORD_COUNT counts the number of "words" in a string.
Return to the FORTRAN software page.
Last revised on 15 May 2002.