Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Futility
Futility
Commits
92d4f8cd
Commit
92d4f8cd
authored
Sep 02, 2021
by
Henderson, Shane
Committed by
Graham, Aaron
Sep 02, 2021
Browse files
Make IF/ELSE statements more concise by using MERGE
parent
8f561a8f
Pipeline
#162198
passed with stage
in 2 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/FileType_HDF5.f90
View file @
92d4f8cd
...
...
@@ -7224,11 +7224,7 @@ SUBROUTINE write_attribute_b0(this,obj_name,attr_name,attr_val)
CALL
h5screate_simple_f
(
num_dims
,
dims
,
dspace_id
,
error
)
!Create and write to the attribute within the dataspce
IF
(
attr_val
)
THEN
char_attr_val
=
'T'
ELSE
char_attr_val
=
'F'
ENDIF
char_attr_val
=
MERGE
(
'T'
,
'F'
,
attr_val
)
CALL
createAttribute
(
this
,
obj_id
,
attr_name
,
H5T_NATIVE_CHARACTER
,&
dspace_id
,
attr_id
)
CALL
h5awrite_f
(
attr_id
,
H5T_NATIVE_CHARACTER
,
char_attr_val
,
dims
,
error
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment