Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
urbanjost committed Feb 10, 2023
1 parent c43901c commit 2d3a1bb
Show file tree
Hide file tree
Showing 147 changed files with 8,998 additions and 10,860 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ conventional Unix-style syntax for short and long parameters:
! Define command and default values and parse supplied command line options
call set_args('-x 1 -y 2.0 -z 3.5e0 -p 11,-22,33 --title:T "my title" -l F -L F')
!
! Get scalar non-allocatable values
! multiple scalar non-allocatable values can be done in one call if desired
call get_args('x',x,'y',y,'z',z,'l',l,'L',lbig)
! use convenience functions for allocatable arrays and strings
! you can use convenience functions for allocatable arrays and strings.
! The functions are particularly useful in expressions and as arguments on
! procedure calls
title=sget('title') ! string
p=igets('p') ! integer array
!
Expand Down
4 changes: 4 additions & 0 deletions docs/BOOK_M_CLI2.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
border-color: blue;
}
/* ======================================================== */
summary{
background-color: white;
}
/* ======================================================== */
body{
background-color: black;
margin-top: 1.58em;
Expand Down
84 changes: 51 additions & 33 deletions docs/M_CLI2.3m_cli2.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ <H3>EXAMPLE</H3>
implicit none
integer :: i
integer,parameter :: dp=kind(0.0d0)
!
! DEFINE ARGS
!
! Define ARGS
real :: x, y, z
logical :: l, lbig
character(len=40) :: label ! FIXED LENGTH
Expand All @@ -173,15 +173,15 @@ <H3>EXAMPLE</H3>
character(len=:),allocatable :: title ! VARIABLE LENGTH
real :: p(3) ! FIXED SIZE
logical :: logi(3) ! FIXED SIZE
!
! DEFINE AND PARSE (TO SET INITIAL VALUES) COMMAND LINE
! o set a value for all keywords.
! o double-quote strings, strings must be at least one space
! because adjacent double-quotes designate a double-quote
! in the value.
! o set all logical values to F
! o numeric values support an "e" or "E" exponent
! o for lists delimit with a comma, colon, or space
!
! DEFINE AND PARSE (TO SET INITIAL VALUES) COMMAND LINE
! o set a value for all keywords.
! o double-quote strings, strings must be at least one space
! because adjacent double-quotes designate a double-quote
! in the value.
! o set all logical values to F
! o numeric values support an "e" or "E" exponent
! o for lists delimit with a comma, colon, or space
call set_args(&#146; &
& -x 1 -y 2 -z 3 &
& -p -1 -2 -3 &
Expand All @@ -192,25 +192,34 @@ <H3>EXAMPLE</H3>
& --label " " &
! note space between quotes is required
& &#146;)
! ASSIGN VALUES TO ELEMENTS
! non-allocatable scalars can be done up to twenty per call
! Assign values to elements using G_ARGS(3f).
! non-allocatable scalars can be done up to twenty per call
call get_args(&#146;x&#146;,x, &#146;y&#146;,y, &#146;z&#146;,z, &#146;l&#146;,l, &#146;L&#146;,lbig)
!
! allocatables should be done one at a time
! As a convenience multiple pairs of keywords and variables may be
! specified if and only if all the values are scalars and the CHARACTER
! variables are fixed-length or pre-allocated.
!
! After SET_ARGS(3f) has parsed the command line
! GET_ARGS(3f) retrieves the value of keywords accept for
! two special cases. For fixed-length CHARACTER variables
! see GET_ARGS_FIXED_LENGTH(3f). For fixed-size arrays see
! GET_ARGS_FIXED_SIZE(3f).
!
! allocatables should be done one at a time
call get_args(&#146;title&#146;,title) ! allocatable string
call get_args(&#146;point&#146;,point) ! allocatable arrays
call get_args(&#146;logicals&#146;,logicals)
!
! less commonly &#46;&#46;&#46;
!
! less commonly &#46;&#46;&#46;
<P>
! for fixed-length strings
! for fixed-length strings
call get_args_fixed_length(&#146;label&#146;,label)
<P>
! for non-allocatable arrays
! for non-allocatable arrays
call get_args_fixed_size(&#146;p&#146;,p)
call get_args_fixed_size(&#146;logi&#146;,logi)
!
! all done parsing, use values
!
! all done parsing, use values
write(*,*)&#146;x=&#146;,x, &#146;y=&#146;,y, &#146;z=&#146;,z, x+y+z
write(*,*)&#146;p=&#146;,p
write(*,*)&#146;point=&#146;,point
Expand All @@ -220,13 +229,13 @@ <H3>EXAMPLE</H3>
write(*,*)&#146;L=&#146;,lbig
write(*,*)&#146;logicals=&#146;,logicals
write(*,*)&#146;logi=&#146;,logi
!
! unnamed strings
!
!
! unnamed strings
!
if(size(filenames) &gt; 0)then
write(*,&#146;(i6.6,3a)&#146;)(i,&#146;[&#146;,filenames(i),&#146;]&#146;,i=1,size(filenames))
endif
!
!
end program demo_M_CLI2
<P>
</PRE>
Expand Down Expand Up @@ -262,26 +271,35 @@ <H3>SEE ALSO</H3>
<TR valign=top><TD width=3%>
o
</TD><TD>
specified(3f)
get_args_fixed_size(3f)
</TD></TR>
<TR valign=top><TD width=3%>
o
</TD><TD>
get_args_fixed_length(3f)
</TD></TR>
<TR valign=top><TD width=3%>
o
</TD><TD>
get_subcommand(3f)
</TD></TR>
<TR valign=top><TD width=3%>
o
</TD><TD>
set_mode(3f)
</TD></TR>
<TR valign=top><TD width=3%>
o
</TD><TD>
specified(3f)
</TD></TR>
<TR></TR></TABLE></BLOCKQUOTE>
<P>
Note that the convenience routines are described under get_args(3f):
dget(3f), iget(3f), lget(3f), rget(3f), sget(3f), cget(3f) dgets(3f),
igets(3f), lgets(3f), rgets(3f), sgets(3f), cgets(3f)
<P>
<PRE>
+ get_subcommand(3f)
+ get_args_fixed_size(3f), get_args_fixed_length(3f)
<P>
</PRE>
<P><HR>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>M_CLI2 (3m_cli2)</TD> <TD align=right width=33%><I>February 10, 2023</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 610c917e-5c7b-43ca-89b6-727e793e8254 using man macros.</FONT>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>M_CLI2 (3m_cli2)</TD> <TD align=right width=33%><I>February 10, 2023</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 5107b51e-b291-45d2-8e1f-efef0bf396dc using man macros.</FONT>
<br><br><center><img src="images/M_CLI2.gif"></center>
</div>
</div>
Expand Down
Loading

0 comments on commit 2d3a1bb

Please sign in to comment.