Skip to content

Commit

Permalink
white space errata
Browse files Browse the repository at this point in the history
  • Loading branch information
urbanjost committed Apr 30, 2022
1 parent 76948e3 commit 9bf73a5
Show file tree
Hide file tree
Showing 21 changed files with 72 additions and 128 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ program that exercise the routine.
```bash
git clone https://github.com/urbanjost/M_display.git
cd M_display
fpm run
fpm run --example
fpm run "*"
fpm run --example "*"
fpm test
```

Expand All @@ -93,14 +93,14 @@ program that exercise the routine.
[dependencies]
M_display = { git = "https://github.com/urbanjost/M_display.git" }
```
## DOCUMENTATION
## DOCUMENTATION ![docs](docs/images/docs.gif)

### USER
Note in this version the module "dispmodule" has been named "M_display" ...

- [Original report](docs/dispmodule-report.pdf)
- [Original User Manual](docs/dispmodule-userman-report.pdf)
- ![manpages](docs/images/manpages.gif)
- ![man-pages](docs/images/manpages.gif)
+ a simple index to the man-pages in HTML form for the
[routines](https://urbanjost.github.io/M_display/man3.html)
and [programs](https://urbanjost.github.io/M_display/man1.html)
Expand Down
2 changes: 1 addition & 1 deletion docs/BOOK_M_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="generator" content="vi(1)/vim(1)" />
<meta name="description" content="@(#)M_display::BOOK_M_display: BOOK composed of pages for man(1) topic M_display"/>
<meta name="author" content="urbanjs" />
<meta name="date" content="2022-01-03" />
<meta name="date" content="2022-04-30" />
<meta name="keywords" content="Fortran, Fortran code, source code repository, Fortran library, Fortran archive, source code" />
<!--
Pick your favorite style sheet from among the eight offerings:
Expand Down
23 changes: 6 additions & 17 deletions docs/M_display.3m_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,7 @@ <H3>INTRODUCTION</H3>
+inf or <B>-inf</B>.
<P>
the remaining sections in this user manual contain detailed information
<TABLE cellpadding=3><!-- tsb: the remaining sections in this user manual contain detailed information
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>on using the module.</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
section 2 discusses the basics of using the
on using the module. section 2 discusses the basics of using the
module, including use statements, compiling and linking, and add-on
modules supporting non-default kinds of data. section 3 gives a detailed
description of the generic subroutine disp. all the possible arguments
Expand All @@ -190,8 +185,7 @@ <H3>INTRODUCTION</H3>
disp. section 5 describes the function tostring which may be used to
change numbers to strings. finally testing of the module is discussed
in section 6.
</TD></TR>
<TR></TR></TABLE></BLOCKQUOTE>
</BLOCKQUOTE>
<A name=2>

<H3>OVERVIEW OF MODULES</H3>
Expand All @@ -202,16 +196,11 @@ <H3>OVERVIEW OF MODULES</H3>
The file M_display.f90 actually begins with two auxiliary modules,
PUTSTRMODULE and M_display_UTIL. The first one contains two dummy
subroutines, PUTSTR and PUTNL, which do nothing, but must be incorporated
<TABLE cellpadding=3><!-- tsb: The file M_display.f90 actually begins with two auxiliary modules,
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>to avoid an undefined symbol link error.</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
In addition it defines the
to avoid an "undefined symbol" link error. In addition it defines the
named constant (parameter) DEFAULT_UNIT = <B>-3</B>, which makes the asterisk
unit (usually the screen) the default to display on.
</TD></TR>
<TR></TR></TABLE>Alternatively the user can write his own PUTSTRMODULE as described
<P>
Alternatively the user can write his own PUTSTRMODULE as described
below. An example is near the beginning of M_display.f90 (commented out)
and also in the file putstrmodule_mex.f90, enclosed with the package. It
may be used (commented in instead of the default one) to allow Matlab
Expand Down Expand Up @@ -311,7 +300,7 @@ <H3>AUTHOR</H3>
University of Iceland (<A HREF="mailto:[email protected]">[email protected]</A>).
</BLOCKQUOTE>
<P><HR>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>M_display (3m_display)</TD> <TD align=right width=33%><I>January 03, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from c35aadf0-df8e-4f6b-9e6b-8a4945e10075 using man macros.</FONT>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>M_display (3m_display)</TD> <TD align=right width=33%><I>April 30, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 0171ca32-74d7-4e21-8a78-467a261b210e using man macros.</FONT>
<br><br><center><img src="images/M_display.gif"></center>
</div>
</div>
Expand Down
97 changes: 31 additions & 66 deletions docs/disp.3m_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,12 @@ <H3>DESCRIPTION</H3>
<TR><TD width=6%>&nbsp;</TD><TD>
With the add-on modules described in section 2.3 other kinds may
be displayed. Matrices are displayed in traditional mathematical
<TABLE width=100% cellpadding=3><!-- tsb: With the add-on modules described in section 2.3 other kinds may
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>order, so the rows displayed are </B><B>X</B>(1,:), <B>X</B>(2,:) etc. </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Vectors are
order, so the rows displayed are <B>X</B>(1,:), <B>X</B>(2,:) etc. Vectors are
by default displayed as column vectors (but a row orientation may
be specified with the ORIENT argument). An SS edit descriptor is
applied automatically so positive elements are not prefixed with
a + sign (the Fortran standard makes outputting a + sign optional).
</TD></TR>
<TR></TR></TABLE><!-- .TP -->
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>TITLE</B> </TD><TD valign=bottom>
Provides a label for X. The label prefixes X by default but this
Expand Down Expand Up @@ -182,13 +175,7 @@ <H3>CALL WITH COMPLETE LIST OF ARGUMENTS</H3>
</BLOCKQUOTE>
<P>
All dummy arguments are optional and some of them are incompatible
<BLOCKQUOTE>
<TABLE cellpadding=3><!-- tsb: All dummy arguments are optional and some of them are incompatible
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>with some data types of X.</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The arguments control how X is displayed,
with some data types of X. The arguments control how X is displayed,
as described in section 3.1 and below. For the character arguments
ADVANCE and ORIENT the case of letters is ignored (so e.g. ADVANCE =
for arguments after FMT (or FMT_IMAG) will be realized with argument
Expand All @@ -198,24 +185,20 @@ <H3>CALL WITH COMPLETE LIST OF ARGUMENTS</H3>
to advance to the next line or display an empty line. For this purpose,
the only relevant arguments are UNIT, and ADVANCE with the value &#146;YES&#146;
or &#146;DOUBLE&#146;.
</TD></TR>
<BLOCKQUOTE>
<TABLE cellpadding=3><!-- tsb: All dummy arguments are optional and some of them are incompatible
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>FMT_IMAG = edit-descriptor-imag</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
An edit descriptor for imaginary parts
of complex X. The statement CALL <B>DISP</B>((1.31,2.47),&#146;F0.1&#146;,&#146;F0.2&#146;)
will display "1.3 + 2.47i". If FMT_IMAG is absent and FMT
is present then both real and imaginary parts are edited with
FMT. If both are absent, separate defaults are used, as explained
<TABLE width=100% cellpadding=3><!-- tsb: An edit descriptor for imaginary parts
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>in the DIGMAX-paragraph below.</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
FMT_IMAG must be absent if X is
in the DIGMAX-paragraph below. FMT_IMAG must be absent if X is
not complex.
</TD></TR>
<TR></TR></TABLE><!-- .TP -->
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ADVANCE = adv</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The value for ADVANCE may be &#146;yes&#146;, &#146;no&#146; or &#146;double&#146;. If
Expand All @@ -226,16 +209,9 @@ <H3>CALL WITH COMPLETE LIST OF ARGUMENTS</H3>
keyword). When this occurs, all the items displayed with DISP since
the last output occurred on the unit are written out side by side,
separated by three spaces unless a different separation has been
<TABLE width=100% cellpadding=3><!-- tsb: The value for ADVANCE may be &#146;yes&#146;, &#146;no&#146; or &#146;double&#146;. If
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>specified via the MATSEP argument of DISP_SET.</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Default value of
specified via the MATSEP argument of DISP_SET. Default value of
ADVANCE is &#146;yes&#146;.
</TD></TR>
<TR></TR></TABLE><!-- .TP -->
</TD></TR>
<TR valign=top><TD colspan=2>
<B>DIGMAX = n</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Controls the format used for real and complex data in the
Expand Down Expand Up @@ -340,12 +316,7 @@ <H3>CALL WITH COMPLETE LIST OF ARGUMENTS</H3>
This argument can take three values, &#146;YES&#146;, &#146;NO&#146; and
trimmed from the left, with &#146;NO&#146; the items are not trimmed and if
TRIM is &#146;AUTO&#146; the items are trimmed when FMT is absent but not when
<TABLE width=100% cellpadding=3><!-- tsb: This argument can take three values, &#146;YES&#146;, &#146;NO&#146; and
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>it is present.</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
In the following example, X and U are displayed
it is present. In the following example, X and U are displayed
with TRIM = &#146;yes&#146;, but Y and V with TRIM = &#146;no&#146;. In all cases the
edit descriptor is the default (I4). The default is TRIM = &#146;AUTO&#146;.
</TD></TR>
Expand All @@ -357,17 +328,20 @@ <H3>CALL WITH COMPLETE LIST OF ARGUMENTS</H3>
&gt; 3 32 1234 3 32 1234
<P>
</PRE>
</TD></TR>
<TR><TD width=6%>&nbsp;</TD><TD>
One application of trimming is to display matrices with a fixed
number of fractional digits but variable effective field width. Then
Fw.d editing with w big enough is accompanied by TRIM = &#146;yes&#146;. An
example is the following display of a matrix with (i, k) element
<B>exp</B>(k**i) using F20.2 and &#146;yes&#146;:
</TD></TR>
<TR><TD colspan=2>
<P>
<PRE>
power exponentials
</PRE>
</TD></TR>
<TABLE width=100% cellpadding=3><!-- tsb: power exponentials
-->
<TR></TR><TR></TR>
<TR><TD width=6%>&nbsp;</TD><TD>
<TABLE width=100% cellpadding=3>
<TR valign=top><TD width=6% nowrap>
Expand All @@ -378,9 +352,10 @@ <H3>CALL WITH COMPLETE LIST OF ARGUMENTS</H3>
<B>2.72</B> </TD><TD valign=bottom>
54.60 8103.08
</TD></TR>
<TR></TR></TABLE></TD></TR>
<TR></TR></TABLE><!-- .PP -->
</TD></TR>
<TR></TR></TABLE>Similar output may be obtained using I and F edit descriptors
<P>
Similar output may be obtained using I and F edit descriptors
with w = 0 as discussed in section 3.5. Apart from I and F edited
displays, it is possible to trim A-edited displays as well as
E-edited displays with some negative elements, but the first column
Expand Down Expand Up @@ -483,17 +458,11 @@ <H3>ASTERISK_UNIT AND NULL_UNIT</H3>
</PRE>
The first of these should output the string S, and the second one should
advance output to the next line. These subroutines should be placed
<TABLE cellpadding=3><!-- tsb: The first of these should output the string S, and the second one should
-->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>in a module PUTSTRMODULE as explained in section 2.</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The module should
in a module PUTSTRMODULE as explained in section 2. The module should
also define a named constant DEFAULT_UNIT, which could be set to <B>-2</B> to
make the PUTSTR_UNIT default. An example that works with g95 and Matlab
mex-files is:
</TD></TR>
<TR><TD colspan=2>
<P>
<PRE>
module putstrmodule
integer, parameter :: default_unit = -2
Expand All @@ -514,11 +483,9 @@ <H3>ASTERISK_UNIT AND NULL_UNIT</H3>
At the beginning of the file M_display.f90 there is a slightly longer
version which works with both g95 and gfortran. Testing this module is
discussed in section 6.2 below.
</TD></TR>
<TR><TD colspan=2>
<P>
USING W=0 EDITING
</TD></TR>
<TR><TD colspan=2>
<P>
The Fortran standard stipulates that writing a single element with
I0 editing results in the smallest field width that accommodates the
value, and the same applies to B0, O0, Z0 and F0.d editing. With DISP,
Expand All @@ -528,8 +495,7 @@ <H3>ASTERISK_UNIT AND NULL_UNIT</H3>
width bigger than the largest occurring. Note that with F0.d editing,
there is no limit on the width of a column, but with Fw.d and TRIM=&#146;yes&#146;
any element wider than w will be displayed as w asterisks:
</TD></TR>
<TR><TD colspan=2>
<P>
<PRE>
------------------F0.2------------------ -----F13.2, TRIM=&#146;yes&#146;----
14.28 142857142857142857142857.14 0.47 14.28 ************* 0.47
Expand All @@ -538,25 +504,24 @@ <H3>ASTERISK_UNIT AND NULL_UNIT</H3>
<P>
</PRE>
NOT-A-NUMBER AND INFINITE VALUES
</TD></TR>
<TR><TD colspan=2>
<P>
If the compiler supports not-a-number and infinite values as defined by
the IEEE exceptional values of Fortran 2003, these are displayed as NaN,
+Inf or Inf. A not-a-number value X is identified as being not equal to
itself, and an infinite value is either greater than <B>HUGE</B>(X) or smaller
than -<B>HUGE</B>(X). On all the compilers tried the sequence BIG=1E20; CALL
<B>DISP</B>(EXP(BIG)) displays +Inf, and the program segment:
</TD></TR>
<TR><TD colspan=2>
<P>
<PRE>
&gt; real :: z = 0, big = 1e20
&gt; call disp([z, z/z, big, -exp(big)])
<P>
</PRE>
displays
</TD></TR>
<TR><TD width=6%>&nbsp;</TD><TD>
<TABLE width=100% cellpadding=3>
<BLOCKQUOTE>
<TABLE cellpadding=3><!-- tsb: displays
-->
<TR></TR><TR></TR>
<TR valign=top><TD width=6% nowrap>
<B>&gt;</B> </TD><TD valign=bottom>
0.00000E+00
Expand All @@ -573,8 +538,8 @@ <H3>ASTERISK_UNIT AND NULL_UNIT</H3>
<B>&gt;</B> </TD><TD valign=bottom>
<B>-Inf</B>
</TD></TR>
<TR></TR></TABLE></TD></TR>
<TR></TR></TABLE></BLOCKQUOTE>
</BLOCKQUOTE>
<A name=4>

<H3>AUTHOR</H3>
Expand All @@ -589,7 +554,7 @@ <H3>AUTHOR</H3>
University of Iceland (<A HREF="mailto:[email protected]">[email protected]</A>).
</BLOCKQUOTE>
<P><HR>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>disp (3m_display)</TD> <TD align=right width=33%><I>January 03, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 9a74abf5-7e1f-4811-b910-9ac47629266f using man macros.</FONT>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>disp (3m_display)</TD> <TD align=right width=33%><I>April 30, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 4b1a6c6c-713c-4b03-9490-517b8e6ade5c using man macros.</FONT>
<br><br><center><img src="images/disp.gif"></center>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/disp_get.3m_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <H3>AUTHOR</H3>
University of Iceland (<A HREF="mailto:[email protected]">[email protected]</A>).
</BLOCKQUOTE>
<P><HR>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>disp_get (3m_display)</TD> <TD align=right width=33%><I>January 03, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 956ef22e-0176-442c-899e-4b9f0f107c13 using man macros.</FONT>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>disp_get (3m_display)</TD> <TD align=right width=33%><I>April 30, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 545550ac-5d9f-49c2-94fd-ab4b2ef1b932 using man macros.</FONT>
<br><br><center><img src="images/disp_get.gif"></center>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/disp_set.3m_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <H3>AUTHOR</H3>
University of Iceland (<A HREF="mailto:[email protected]">[email protected]</A>).
</BLOCKQUOTE>
<P><HR>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>disp_set (3m_display)</TD> <TD align=right width=33%><I>January 03, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 8bbcc699-67e0-4773-ba9a-9718044b6fd0 using man macros.</FONT>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>disp_set (3m_display)</TD> <TD align=right width=33%><I>April 30, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 4a10ed0d-0f86-4126-a634-4a3154e399a0 using man macros.</FONT>
<br><br><center><img src="images/disp_set.gif"></center>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/disp_set_factory.3m_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <H3>AUTHOR</H3>
Dept. of Computer Science, University of Iceland (<A HREF="mailto:[email protected]">[email protected]</A>).
</BLOCKQUOTE>
<P><HR>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>disp_set_factory (3m_display)</TD> <TD align=right width=33%><I>January 03, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 0691e424-5aa0-45c2-a156-11584c3349be using man macros.</FONT>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>disp_set_factory (3m_display)</TD> <TD align=right width=33%><I>April 30, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http:https://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 1a3e016d-0d5a-452b-9ccf-88014f1f1819 using man macros.</FONT>
<br><br><center><img src="images/disp_set_factory.gif"></center>
</div>
</div>
Expand Down
Binary file added docs/fpm-ford/media/fpm_button.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/fpm-ford/media/fpm_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/docs.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/fpm_button.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/fpm_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="generator" content="vi(1)/vim(1)" />
<meta name="description" content="@(#)M_display::BOOK_M_display: BOOK composed of pages for man(1) topic M_display"/>
<meta name="author" content="urbanjs" />
<meta name="date" content="2022-01-03" />
<meta name="date" content="2022-04-30" />
<meta name="keywords" content="Fortran, Fortran code, source code repository, Fortran library, Fortran archive, source code" />
<!--
Pick your favorite style sheet from among the eight offerings:
Expand Down
Loading

0 comments on commit 9bf73a5

Please sign in to comment.