Bset8 Function

Purpose

Sets one bit in an integer expression or variable.

Syntax

Large = Bset8(m, n)

Bset8 var64, n

n:iexp m,

var64:int64 exp

Description

Bset8(m, n) function sets the n-th bit in the integer expression m and returns the new 64 bit integer value.

Bset8 var64,n command sets the n-th bit in the integer variable var64.

Example

OpenW # 1

Dim i64 As Large = 10                     //  10 => 1010

i64 = Bset8(i64, 0) : Print Bin$(i64, 4// Prints 1011

Remarks

Although listed in the original help file as a command - i.e. Bset8 v64, n - it seems never to have been implemented as such.

See Also

Bclr8(), Btst8(), Bchg8()

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