Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
H
handyG
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
McMule
handyG
Commits
f208a6d5
Commit
f208a6d5
authored
May 22, 2019
by
Luca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get verbosity from cmd arg
parent
3fbebc8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
src/eval.f90
src/eval.f90
+1
-1
src/globals.f90
src/globals.f90
+21
-1
No files found.
src/eval.f90
View file @
f208a6d5
...
...
@@ -6,7 +6,7 @@ PROGRAM eval
complex
(
kind
=
prec
)
::
res
print
*
,
verbosity
call
parse_cmd_args
()
res
=
GPL
(
cmplx
([
1
,
2
,
5
]))
print
*
,
res
...
...
src/globals.f90
View file @
f208a6d5
...
...
@@ -8,6 +8,26 @@ MODULE globals
real
,
parameter
::
zero
=
1e-15
! values smaller than this count as zero
real
,
parameter
::
pi
=
3.14159265358979323846
integer
::
verbosity
=
100
integer
::
verbosity
=
0
CONTAINS
SUBROUTINE
parse_cmd_args
integer
::
i
character
(
len
=
32
)
::
arg
i
=
0
do
call
get_command_argument
(
i
,
arg
)
if
(
len_trim
(
arg
)
==
0
)
exit
! parse verbosity
if
(
trim
(
arg
)
==
'-verb'
)
then
call
get_command_argument
(
i
+1
,
arg
)
read
(
arg
,
*
)
verbosity
! str to int
end
if
i
=
i
+1
end
do
END
SUBROUTINE
parse_cmd_args
END
MODULE
globals
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment