Advertisement
Java_Volume1 Coding Standards #90166

SIMPLE way to reverse the value of a Boolean field

This is an extremely easy method of reversing the value of a Boolean value.

AI

Resumo por IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Código fonte
original-source
<font face="tahoma,verdana,helveica,arial" size=2 style="font-size: 8pt;">
If you have ever done this:<BR><BR>
IF someBoolean = TRUE THEN<BR>
   someBoolean = FALSE<BR>
ELSE<BR>
   someBoolean = TRUE<BR>
END IF<BR><BR>
Here's an easier method:<BR><BR>
someBoolean = NOT someBoolean.<BR><BR>
That's it... vote if you like.<BR><BR>
- Derreck
</font>
Comentários originais (3)
Recuperado do Wayback Machine