Strange behaviour in J-Builder
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Simon_Ablett
Posted On:   Wednesday, January 23, 2002 06:31 AM

Some of our developer's have notice strange behaviour with code entered in J-Builder under Win-NT 4. This behaviour relates to boolean conditions. Occasionally, when code is entered that contains some kind of boolean comparison the comparison will fail even if the values being compared are proved to be equal. Consider the following contrived example. boolean flag = true; if (flag==true) { System.out.println("flag is true"); } else { System.out.println("flag is false"); } In the above example, 'flag is false' would occasionally be displayed. Deleting the line 'if (flag==true)' and re-entering it would cause the program to exh   More>>

Some of our developer's have notice strange behaviour with code entered in J-Builder under Win-NT 4. This behaviour relates to boolean conditions. Occasionally, when code is entered that contains some kind of boolean comparison the comparison will fail even if the values being compared are proved to be equal.

Consider the following contrived example.

			
boolean flag = true;

if (flag==true)
{
System.out.println("flag is true");
}
else
{
System.out.println("flag is false");
}

In the above example, 'flag is false' would occasionally be displayed. Deleting the line 'if (flag==true)' and re-entering it would cause the program to exhibit its correct behaviour.(we have checked for mistypes of the form 'a=true etc.)

The problem is intermittent but when it does occur it can waste quite a bit of our developer's time (unfortunately most code is not as simple as the above example!!).

Before I contact Borland I would just like to see if anyone else has had similiar experiences.

Regards.    <<Less
About | Sitemap | Contact