Btst Function

Purpose

Tests the bit status in an integer expression.

Syntax

Bool = Btst(m, n)

m, n:iexp

Description

Btst(m, n) returns -1(true) when the n-th bit in the integer expression m is set, and 0 (false) if it's not.

Example

Local i% = 10     // 10 => 1010

Print Btst(i%, 3) // Prints True

See Also

Bclr(), Bset(), Bchg()

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