Older Newer
Sat, 24 Nov 2007 14:18:54 . . . . (J Duncan Suss)?

Changes by last author:

= cell_preserve =

== Syntax ==

:cell_preserve(int n)

== Arguments ==


::0 or 1

== Description ==

:FilterMeister has a small internal buffer of 1024 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.

: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.

:Calling the cell_preserve(0) function restores the default behavior, meaning that the buffer values will be reset to zero at the end of the currently executing handler.

:Note: cell_preserve was originally introduced as a FilterMeister function with the name cell_initialize. The cell_initialize form is now deprecated, and it is recommended that the cell_preserve form be substituted whenever old code is updated. cell_initialize took the same parameter values and performed identically.

== Example ==





cell_preserve(1); // remember values in buffer

put(10, 0);

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



== Also see ==

:get, put