Prototype
void EValue::Invert( void );

Cette fonction inverse chaque bit de la variable membre m_tValue.

 

Argument

aucun.

 

Retour

aucun.

 

Exemple

Description :

• Instancier un objet EValue de type uchar initialisé avec la valeur 0xAA (10101010),
• Inverser chacun de ses bits.

Code :

EValue <uchar> eValue( 0xAA );

eValue.TraceEx( _T("eValue") );
eValue.Invert();
eValue.TraceEx( _T("eValue") );

Sortie :

### Object EValue 'eValue' Trace #
# Object address='0x0012F483', size of='1' byte(s) ('8' bits).
# Value:
# Decimal='-86'(signed) '170'(unsigned), Hexadecimal='0xAA'.
# Binary = 10101010
# Equal. = ========
# Pos maj= 00000000
# Pos min= 76543210
### End #

### Object EValue 'eValue' Trace #
# Object address='0x0012F483', size of='1' byte(s) ('8' bits).
# Value:
# Decimal='85'(signed) '85'(unsigned), Hexadecimal='0x55'.
# Binary = 01010101
# Equal. = ========
# Pos maj= 00000000
# Pos min= 76543210
### End #

Vue :

07 06 05 04 03 02 01 00

Champs de bits

1 0 1 0 1 0 1 0 Valeur originale

07 06 05 04 03 02 01 00

Champs de bits

1 0 1 0 1 0 1 0 Valeur originale
1 1 1 1 1 1 1 1 Inversion
0 1 0 1 0 1 0 1 Résultat

 

Voir aussi
void EValue::MaskInvert( T tMaskToInvert );
BOOL EValue::MaskInvertEx( T tMaskToInvert );

 

Minimum
Version 1.0.0