en:software:qview:qview_6:qcl_library:bc21initbuf

This translation is older than the original page and might be outdated. See what has changed.

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.

BC21InitBuf (array, errcode, head, tail)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
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

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.
  • Last modified: 2019/08/29 17:01