Older Newer
Wed, 05 Dec 2007 18:29:48 . . . . afh [Replace 1024 with symbolic constant N_CELLS.]


Changes by last author:

Added:
= get =

== Syntax ==

:int get(int item)

== Arguments ==

:item

::Numeric identifier of an item in the buffer.

== Return ==

:The value of the buffered item requested.

== Description ==

: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 releases of FilterMeister, but 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 get function takes an integer argument in the range of 0 up to and including (N_CELLS - 1) and returns the value stored in that position in the buffer.

== Example ==

<code>

%ffp

OnFilterStart:

{

put(10, 0);

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

}

</code>

== Also see ==

:put, cell_preserve