Software Archive
Read-only legacy content
17061 Discussions

String comparison fails

Intel_C_Intel
Employee
2,794 Views
I am performing a simple string comparison that returns false when it should return true. The line of code is:
IF (A(9) .EQ. ' ') THEN
When I put a break point on this line and check the value of A(9) it is ' ' just as it should be but the result of the statement is false and the ELSE part of the IF statement then executes. A is declared by:
CHARACTER*52 A(25)
and is part of a common block. I have also found that the intrinsic string functions aren't working here either. Do I have something wrong here?
0 Kudos
22 Replies
Intel_C_Intel
Employee
349 Views
Thanks for the pointer to the release notes. It seems that support for 'x' format specifiers in the watch window for character variables was added in 6.5A, although the 6.5A release notes don't mention it. 6.5 handles 'o', 'i', 'd' for character variables as the release notes mention.

I was looking at a 6.5 installation for my prior post. Sorry for the confusion.

Thanks,
John
0 Kudos
nijhuis
Beginner
349 Views
I do have version 6.5A, but I was not aware of the possibility to use format specifiers. So, I have learned a useful feature. Thank you.

Guus.
0 Kudos
Reply