bitlist: Compute the bitwise OR of one or more values and/or vectors

View source: R/aclassesEnums.R

bitlistR Documentation

Compute the bitwise OR of one or more values and/or vectors

Description

This function is used to compute the bitwise OR of a collection of values given in a vector or individually via the ... mechanism (or both). It is equivalent to the C code a | b | c and that form is also supported for BitwiseValue objects. And this function uses bitlist(a, b, c) or bitlist(c(a, b, c)). These two forms support interactive use and programmatic use where the values are already in a single container (i.e. vector or list).

This uses Steve Dutky's bitops package.

Usage

bitlist(...)

Arguments

...

individual values or vectors which are all unravelled into a single vector via unlist

Value

A single number which is the bitwise OR'ing of all the elements performed successively.

Author(s)

Duncan Temple Lang

References

Steve Dutky's bitops package and specifically bitOr package.

See Also

BitwiseValue-class

Examples

 bitlist(c(2, 3, 8))
 bitlist(2, 3, 8)

omegahat/RAutoGenRunTime documentation built on Jan. 12, 2023, 9:19 p.m.