QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _SETBIT function is used to set a specified bit of a numerical value to 1 (on state).

Syntax

result = _SETBIT(numericalVariable, numericalValue)

Parameter(s)

Description

Availability

Example(s)


A~%% = 0 '_UNSIGNED _BYTE
PRINT A~%%
A~%% = _SETBIT(A~%%,6) 'set the seventh bit of A~%%
PRINT A~%%


 0
 64

See Also