Skip to content

Commit 89df63a

Browse files
committed
Update example_to_c_char.f90
1 parent 6335dc0 commit 89df63a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

example/strings/example_to_c_char.f90

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ program example_to_c_char
1313
! Convert string type
1414
cstr2 = to_c_char(string_type(hello))
1515

16-
if (size(cstr)==size(cstr2) .and. all(cstr==cstr2)) then
17-
stop 0
18-
else
16+
if (size(cstr)/=size(cstr2) .or. .not.all(cstr==cstr2)) then
1917
error stop 'String conversion error'
2018
end if
2119

0 commit comments

Comments
 (0)