findBlock
|
The findBlock function returns the bit index value for the first available
block of the specified length. Vacant blocks are represented by 0 bits,
while occupied blocks are represented by 1 bits. For example: The above findBlock invocation returns the bit index of the first vacant block
(which is immediately followed by two other vacant blocks). If there do not exist
three vacant blocks immediately adjacent anywhere within the bit vector, then
false is returned. Usage The findBlock function is used to locate free block space in a BitVector
used to manage a memory space or disk space.
(setq myBlock (findBlock bitVector 3))
(findBlock bitVector blockCount) The bit index of the first vacant block, or false if none found.
Expression:
Arguments
Name
Type
Description Argument: bitVector BitVector
The BitVector in which a vacant block is to be found. Argument: blockCount Integer
The number of consecutive vacant blocks to be found
Returns:
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments.
Vector | BitVector | Integer | Boolean |
Here are also a number of links to functions having arguments with any of these data types.
Analytic Information Server (AIS)AIS Component Systems
|