Functions | |
real *8 | string_to_real (string) |
Convert a string to a real. | |
integer | string_to_integer (string) |
Convert a string to an integer. | |
subroutine | inout_tabs_to_spaces (line) |
Expand all tabs in a line into single spaces (one tab makes one space). | |
subroutine | read_char_raw (unit, char, eol, eof) |
Read a single character from a file, signaling if we have hit EOL or EOF. If EOL or EOF are true then the character value should be ignored. A file containing a single line with a single character on it will first return the character with EOL and EOF both false, then will return with EOL true but EOF false, and finally will return with EOL false and EOF true. | |
subroutine | read_word_raw (unit, word, eol, eof) |
Read a white-space delimited word from a file, signaling if we have EOL or EOF. If EOL or EOF are true then the word will still be meaningful data. If there was no data to be read then len(word) will be 0. | |
Variables | |
integer, parameter | unit1 = 40 |
integer, parameter | unit2 = 41 |
character(len=1000) | filename1 |
character(len=1000) | filename2 |
character(len=1000) | tmp |
real *8 | abs_tol |
real *8 | rel_tol |
integer | ios |
character(len=1000) | word1 |
character(len=1000) | word2 |
logical | eol1 |
logical | eol2 |
logical | eof1 |
logical | eof2 |
real *8 | value1 |
real *8 | value2 |
real *8 | norm1 |
real *8 | norm2 |
real *8 | abs_error |
real *8 | rel_error |
integer | row |
integer | col |
integer | min_row |
integer | max_row |
integer | min_col |
integer | max_col |
If the arrays in the two files are of different sizes then they are automatically different. Otherwise the are the same if
and
and are otherwise different. Setting abs_tol
or rel_tol
to zero skips the corresponding test.
If the files are the same then "files match within the given tolerances
" is printed on stdout, otherwise "files are different
" is printed, followed by the absolute and relative differences, as above, or a message describing the difference. The files will be reported as different if they have a different pattern of end-of-lines and end-of-files, or if they have whitespace in different places (amount of whitespace is irrelevant).
The exit status of the program is:
subroutine numeric_diff::inout_tabs_to_spaces | ( | character(len=*),intent(inout) | line | ) |
Expand all tabs in a line into single spaces (one tab makes one space).
line | Complete input line. |
subroutine numeric_diff::read_char_raw | ( | integer,intent(in) | unit, | |
character,intent(out) | char, | |||
logical,intent(out) | eol, | |||
logical,intent(out) | eof | |||
) |
Read a single character from a file, signaling if we have hit EOL or EOF. If EOL or EOF are true then the character value should be ignored. A file containing a single line with a single character on it will first return the character with EOL and EOF both false, then will return with EOL true but EOF false, and finally will return with EOL false and EOF true.
unit | Unit number to read from. |
char | Character read. |
eol | True if at EOL (end of line). |
eof | True if at EOF (end of file). |
subroutine numeric_diff::read_word_raw | ( | integer,intent(in) | unit, | |
character(len=*),intent(out) | word, | |||
logical,intent(out) | eol, | |||
logical,intent(out) | eof | |||
) |
Read a white-space delimited word from a file, signaling if we have EOL or EOF. If EOL or EOF are true then the word will still be meaningful data. If there was no data to be read then len(word) will be 0.
unit | Unit number to read from. |
word | Word read. |
eol | True if at EOL (end of line). |
eof | True if at EOF (end of file). |
integer numeric_diff::string_to_integer | ( | character(len=*),intent(in) | string | ) |
Convert a string to an integer.
string | String to convert. |
real*8 numeric_diff::string_to_real | ( | character(len=*),intent(in) | string | ) |
Convert a string to a real.
string | String to convert. |
real*8 numeric_diff::abs_error |
real*8 numeric_diff::abs_tol |
integer numeric_diff::col |
logical numeric_diff::eof1 |
logical numeric_diff::eof2 |
logical numeric_diff::eol1 |
logical numeric_diff::eol2 |
character(len=1000) numeric_diff::filename1 |
character(len=1000) numeric_diff::filename2 |
integer numeric_diff::ios |
integer numeric_diff::max_col |
integer numeric_diff::max_row |
integer numeric_diff::min_col |
integer numeric_diff::min_row |
real*8 numeric_diff::norm1 |
real*8 numeric_diff::norm2 |
real*8 numeric_diff::rel_error |
real*8 numeric_diff::rel_tol |
integer numeric_diff::row |
character(len=1000) numeric_diff::tmp |
integer,parameter numeric_diff::unit1 = 40 |
integer,parameter numeric_diff::unit2 = 41 |
real*8 numeric_diff::value1 |
real*8 numeric_diff::value2 |
character(len=1000) numeric_diff::word1 |
character(len=1000) numeric_diff::word2 |