Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8808

Re: Code is Script is behaving same even after removing an IF condition

$
0
0

Hi Chris...

 

Your idea was great... I removed the added condition and ran the debug, it was still still doing the same behaviour as not going through the IF statement...

 

But I did notice that the code is comparing an empty string " " with 1 space and the variable is a 2 space string "  " so it will ever execute the code...

 

Comparing the older version code it was clear that the IF variable had 2 spaces "  " and that was the difference...

 

This is an old code and the developer (new) who made the change and added the variables probably wrote a NEW IF statement without realizing the 2 spaces (This variable is brought from a mainframe string and is defined as 2 spaces)... He did not comment the old IF but deleted it and wrote a new one...

 

It was a doozie but thanks to you I figured it out by doing the debug (I will remember that as many developers are not using the correct comments and/or remarks to define their changes)...

 

Thanks again

 

S.


Viewing all articles
Browse latest Browse all 8808

Trending Articles