ClearBit

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender.

Description

Returns the specified int with the specified bit cleared.

Syntax

[help]
(int) ClearBit ValueToChange:int BitToClear:int 

Example

int a
set a to 15		; bits 0-3 set ; %00001111 binary
set a to ClearBit a, 2	; clear bit 2 (value 4) ;%00000100 binary
; a is now 11

See Also