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
eb58b347
Commit
eb58b347
authored
Oct 03, 2019
by
ulrich_y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved reading of integers
parent
cd88f721
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
checks/test.f90
checks/test.f90
+13
-7
No files found.
checks/test.f90
View file @
eb58b347
...
...
@@ -26,9 +26,7 @@ PROGRAM TEST
select
case
(
trim
(
arg
))
case
(
'-verb'
)
#ifdef DEBUG
i
=
i
+1
call
get_command_argument
(
i
,
arg
)
read
(
arg
,
*
)
verb
! str to int
verb
=
readint
(
trim
(
arg
),
i
)
#else
call
errprint
(
"Argument -verb is not available, compile with --debug"
)
#endif
...
...
@@ -47,10 +45,7 @@ PROGRAM TEST
tol
=
8.0e-7
call
do_ginac_tests
case
(
'-speed-tests'
)
i
=
i
+1
call
get_command_argument
(
i
,
arg
)
read
(
arg
,
*
)
verb
call
do_timing_tests
(
i
)
call
do_timing_tests
(
readint
(
trim
(
arg
),
i
))
case
(
'-hw-tests'
)
tol
=
8.0e-7
call
do_high_weight_tests
...
...
@@ -105,6 +100,17 @@ CONTAINS
stop
1
end
subroutine
function
readint
(
prev
,
i
)
integer
i
,
readint
,
st
character
(
len
=
32
)
::
arg
character
(
len
=*
)
::
prev
i
=
i
+1
call
get_command_argument
(
i
,
arg
)
if
(
len_trim
(
arg
)
==
0
)
call
errprint
(
"Argument "
//
prev
//
" requires a number"
)
read
(
arg
,
*
,
iostat
=
st
)
readint
if
(
st
.ne.
0
)
call
errprint
(
"For argument "
//
prev
//
": "
//
trim
(
arg
)//
" is not a number"
)
end
function
subroutine
check
(
res
,
ref
)
complex
(
kind
=
prec
)
::
res
,
ref
real
(
kind
=
prec
)
::
delta
...
...
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