BitSet.and=

Performs AND operation for all indexes with another bitset of the same maximum size.

Arguments

bitset
to perform AND operation with. If maximum sizes of the bitsets differ, an error will occur.

Return values

None

Complexity

O(size)

Example

"sl/bitSet" useFile a: (1 2) 4 makeBitSet; b: (1 3) 4 makeBitSet; "old a=" print a.getSize [i a @ print "," print ] times LF print "old b=" print b.getSize [i b @ print "," print ] times b a.and= LF print "new a=" print a.getSize [i a @ print "," print ] times
Output:
old a=FALSE,TRUE,TRUE,FALSE, old b=FALSE,TRUE,FALSE,TRUE, new a=FALSE,TRUE,FALSE,FALSE,