std-bitdel


Synopsis

(std-bitdel <val> <flag>)

Description

std-bitdel returns the new flag with the bitvalue val disabled.

It used to disable a setting in a flag, which is used to store independent logical values in a single integer number. It uses bit values and not bit positions because the online help for flags uses bit values too, such as the initget flag: 1,2,4,8,16,32,64,128

Same as (logand flag (~ val))

Example

(std-bitdel 128 129)  => 1

Arguments

val: An integer number representing a bitvalue.

flag: A integer number representing a flag, a logical sum of bitvalues.

Return Value

A integer number, the new flag.

Side Effects

None.

Module

(std-require 'STDMATH)

Defined in STDMATH