Bclr Function

Purpose

clears one bit in an integer expression.

Syntax

i = Bclr(m, n) (function)

Bclr v, n (command)

m, niexp
v:ivar

Description

Bclr(m, n) clears the n-th bit in the integer expression m (the bit is set to 0) and returns a 32-bit integer.

Bclr ivar, n clears the n-th bit in an integer variable.

Example

OpenW # 1

Dim i% = 11                           //  11 => 1011

i% = Bclr(i%, 0) : Print Bin$(i%, 4// Prints 1010

Bclr i%, 1 : Print Bin$(i%, 4)        // Prints 1000

See Also

Bset(), Btst(), Bchg()

{Created by Sjouke Hamstra; Last updated: 24/09/2014 by James Gaite}