BC21InitBuf
B = Buffer
C = Calculation functions
The BC21InitBuf function executes the initialization of an array for use as FIFO memory (First In First Out). The function requires that you pass the name of the array that serves as a buffer, of two variables to store the index of beginning and end of data within the array and returns a value to the ErrCode variable in case there is an error.
IMPLEMENTATION
BC21InitBuf (array, errcode, head, tail)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | ARRSYS / ARRGBL | array | B/W/L/S | Array containing the data |
OUT | GLOBAL | errcode | F | Error flag (see below) |
IN | GLOBAL / SYSTEM | head | L | Internal index |
IN | GLOBAL / SYSTEM | tail | L | Internal index |
Error
0 = No error
Example
INIZ: BC21InitBuf (Buffer, ErrCode, gl001, gl002)** MAIN: WAIT 1 JUMP MAIN END
Note
-
The function must be called to initialize the memory q after this operation can use the other BC21PopBuf, BC21PushBuf, BC21Inspect and BC21Elements functions.