Advertisement
5_2007-2008 Coding Standards #185135

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

AIサマリー: 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.

ソースコード
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>
オリジナルのコメント (3)
Wayback Machineから復元