Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sfx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
inmcm-mirror
sfx
Commits
44a916e7
Commit
44a916e7
authored
6 months ago
by
数学の武士
Browse files
Options
Downloads
Patches
Plain Diff
str comparison func fix
parent
e9dd977a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
srcF/parser_subfunctions.f90
+21
-11
21 additions, 11 deletions
srcF/parser_subfunctions.f90
with
21 additions
and
11 deletions
srcF/parser_subfunctions.f90
+
21
−
11
View file @
44a916e7
...
...
@@ -2,20 +2,29 @@
module
PARSER_SUB_F
contains
FUNCTION
compare_char_arrays
(
arr1
,
arr2
,
N
)
RESULT
(
isEqual
)
FUNCTION
compare_char_arrays
(
arr1
,
arr2
)
RESULT
(
isEqual
)
IMPLICIT
NONE
CHARACTER
,
intent
(
in
)
::
arr1
(
N
)
CHARACTER
,
intent
(
in
)
::
arr2
(
N
)
INTEGER
,
intent
(
in
)
::
N
LOGICAL
::
isEqual
INTEGER
::
i
INTEGER
::
size1
,
size2
CHARACTER
,
intent
(
in
)
::
arr1
(:)
CHARACTER
(
len
=*
),
intent
(
in
)
::
arr2
LOGICAL
::
isEqual
INTEGER
::
N
,
i
size1
=
size
(
arr1
)
size2
=
len
(
arr2
)
isEqual
=
.TRUE.
IF
(
size1
.NE.
size2
)
THEN
isEqual
=
.FALSE.
RETURN
END
IF
N
=
size1
DO
i
=
1
,
N
IF
(
arr1
(
i
)
.NE.
arr2
(
i
))
THEN
IF
(
arr1
(
i
)
.NE.
arr2
(
i
:
i
))
THEN
isEqual
=
.FALSE.
! Найдено неравенство
EXIT
RETURN
END
IF
END
DO
END
FUNCTION
compare_char_arrays
...
...
@@ -30,11 +39,11 @@ module PARSER_SUB_F
call
get_charf
(
config_var_name
,
sfx_type
)
if
(
compare_char_arrays
(
sfx_type
,
"ocean"
,
SIZE
(
sfx_type
)
)
)
then
if
(
compare_char_arrays
(
sfx_type
,
"ocean"
)
)
then
type
=
surface_ocean
else
if
(
compare_char_arrays
(
sfx_type
,
"lake"
,
SIZE
(
sfx_type
)
)
)
then
else
if
(
compare_char_arrays
(
sfx_type
,
"lake"
)
)
then
type
=
surface_lake
else
if
(
compare_char_arrays
(
sfx_type
,
"land"
,
SIZE
(
sfx_type
)
)
)
then
else
if
(
compare_char_arrays
(
sfx_type
,
"land"
)
)
then
type
=
surface_land
end
if
...
...
@@ -43,3 +52,4 @@ module PARSER_SUB_F
end
module
PARSER_SUB_F
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment