setBlock

 

 

Overview

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:

(setBlock bitVector i 3)

The above freeBlock invocation sets the 3 blocks (starting at bit index i) to be occupied. After this invocation:

bitVector[i] = 1

bitVector[(+ i 1)] = 1

bitVector[(+ i 2)] = 1

Usage

The setBlock function is used to allocate block space in a BitVector used to manage a memory space or disk space.

 

Syntax


Expression:

(setBlock bitVector blockIndex blockCount)


Arguments Name Type Description
Argument:bitVectorBitVector The BitVector in which a consecutive string of blocks to be set occupied.
Argument:blockIndexInteger The starting bit index of the consecutive string of blocks to be set occupied.
Argument:blockCountInteger The number of consecutive blocks to be set occupied.

Returns:

The block index after the last occupied block.



 

Examples

Here are a number of links to Lambda coding examples which contain this instruction in various use cases.

 

Argument Types

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.

++ += + /=
/ * -- -=
- abortTransaction addMethod addi
appendWriteln append apply avg
badd balance bcompareEQ bcompareGE
bcompareGT bcompareLE bcompareLT bcompareNE
bdiv beginTransaction binaryInsert binaryNand
binaryNor binaryNot binaryNxor binarySearch
bitToIntegerVector bitToNumberVector bitwiseAnd bitwiseNand
bitwiseNor bitwiseNot bitwiseNxor bitwiseOr
bitwiseShiftLeft bitwiseShiftRight bitwiseXor bmod
bmul boolean cadd ccompareEQ
ccompareGE ccompareGT ccompareLE ccompareLT
ccompareNE cdiv cdr char
character checkPointTransaction clear cmod
cmul code commitTransaction compareEQ
compareGE compareGT compareLE compareLT
compareNE compare comparison compile
cons copy count csub
day days360 debugDetective debug
deleteRows delete dimension disassemble
display divi evalInSyncLocalContext exit
exportCsv exportSbf exportTab fact
fdisplay fileClose fileCopy fileDir
fileDisplay fileErase fileOpen fileReadRecord
fileRead fileResize fileSeek fileWrite
filewriteln findBlock find floor
fraction freeBlock gc gcd
getRecursionCount hashString hour iadd
icompareEQ icompareGE icompareGT icompareLE
icompareLT icompareNE idiv imod
importCsv importSbf importTab imul
insertRows insert inside inspect
integer isAtom isBitVector isBoolean
isBound isByteVector isCharAlphabetic isCharAlphanumeric
isCharLowercase isCharName isCharNumeric isCharUppercase
isCharWhitespace isChar isCharacter isComplex
isDate isDictionary isDirectory isEqual
isError isEven isExact isFloatVector
isIdentical isImmediate isInexact isInside
isIntegerVector isInteger isLambda isMatrix
isMember isMoney isNegative isNull
isNumberMatrix isNumberVector isNumber isObjectVector
isObject isOdd isPair isPcodeVector
isPositive isString isStructure isSymbol
isText isTransaction isType isVector
isZero isub kurtosis lcm
left length lisp list
loadModule loadWorkspace logConsole macroReplace
makeGramMatrix makeQuotedList map mapc
max median member mid
min minute mod modi
money month morph muli
ncompareEQ ncompareGE ncompareGT ncompareLE
ncompareLT ncompareNE new number
objectToList objectToMatrix objectToNumMatrix objectToNumVector
objectToVector offset onError pair
parent parse pointer preAllocateFixedMemoryBlocks
product qt quit random
randomize range rank refAttributes
refValues ref remove rename
replace rept reset resize
reverse right round saveModule
saveObject saveWorkspace second setAttributes
setBlock setCar setCdr setLastCdr
set setf setq sizeof
skew sort sql sqrt
srandom stdev stdevp stringCiEQ
stringCiGE stringCiGT stringCiLE stringCiLT
stringCiNE stringToBVector stringToVector string
subi substitute substringCiEQ substringCiGE
substringCiGT substringCiLE substringCiLT substringCiNE
substringEQ substringGE substringGT substringLE
substringLT substringNE substring sum
sumsqr svmRegression systemCheck system
text time type uniqueInsert
var varp vectorBinaryInnerProduct vectorBipolarInnerProduct
vectorCosineInnerProduct vectorCubeInnerProduct vectorDelete vectorExpInnerProduct
vectorFill vectorInnerProduct vectorLogInnerProduct vectorQuartInnerProduct
vectorQuintInnerProduct vectorSigmoidInnerProduct vectorSineInnerProduct vectorSquareInnerProduct
vectorTanInnerProduct vectorTanhInnerProduct version writelg
writeln year

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE