Commit 92d4f8cd authored by Henderson, Shane's avatar Henderson, Shane Committed by Graham, Aaron
Browse files

Make IF/ELSE statements more concise by using MERGE

parent 8f561a8f
Pipeline #162198 passed with stage
in 2 minutes and 2 seconds
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment