|
setBlock
|
The setBlock function sets the specified blocks to occupied in the Bit Vector.
Vacant blocks are represented by 0 bits, while occupied blocks are represented by
1 bits. For example: The above freeBlock invocation sets the 3 blocks (starting at bit index i) to be occupied. After this invocation: When to use The setBlock function is used to allocate block space in a BitVector used to
manage a memory space or disk space.
(setBlock bitVector i 3)
bitVector[i] = 1
bitVector[(+ i 1)] = 1
bitVector[(+ i 2)] = 1
(setBlock bitVector blockIndex blockCount) The block index after the last occupied block.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_BitVector_setBlock_001
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types bitVector The BitVector in which a consecutive string of blocks to be set occupied. BitVector blockIndex The starting bit index of the consecutive string of blocks to be set occupied. Integer blockCount The number of consecutive blocks to be set occupied. Integer
Returns:
Examples
Argument Types
Vector
BitVector
Integer
Boolean
How do I contact the AIS team?