Sets one bit in an integer expression or variable.
I = Bset(m, n)
Bset ivar, n
m, n:iexp
ivar:ivar
Bset(m, n) sets the n-th bit in the integer expression m and returns the new value.
OpenW # 1
Dim i% = 10 // 10 => 1010
i% = Bset(i%, 0) : Print Bin$(i%, 4) // Prints 1011
Bset i%, 2 : Print Bin$(i%, 4) // Prints 1111
{Created by Sjouke Hamstra; Last updated: 24/09/2014 by James Gaite}