int put(int data, int item)


The integer value which is to be stored in the buffer.
Numeric identifier of an item in the buffer.


The integer value which was stored in the buffer.


FilterMeister has a small internal buffer of N_CELLS integer items which can be accessed by means of the get and put functions. They provide the simplest means for storaging integer data since they require no variable to be declared.
Currently N_CELLS is 1024. It may increase in future versions of FilterMeister, but it will never decrease. N_CELLS will always be a power of 2.
By default, the items in the buffer are initialized to zero at the end of the executing code block. Calling the cell_preserve(1) function changes this behavior so the buffer values are stored between separate handlers, making them ideal for transporting information between them.
The put function takes two integer arguments. The first is the value which will be stored in the buffer. The second is in the range of 0 up to and including (N_CELLS - 1) and denotes the position within the buffer in which to store the data.
The return value of the put function (rarely used) is the integer value of the first argument.



    put(10, 0);
    Info("The value of buffer position 0 is %d", get(0));

Also see

get, cell_preserve