+/* storage functions */
+
+double store (int index)
+{
+ if ((index > 0) && (index <= STORAGE_SIZE)) {
+ storage[index - 1] = answer;
+ } else {
+ VERBOSE (WARNING, fprintf (stdout, "invalid index (%d) [1, %d]\n", index, STORAGE_SIZE));
+ }
+ return answer;
+}
+
+double recall (int index)
+{
+ if ((index > 0) && (index <= STORAGE_SIZE)) {
+ return storage[index - 1];
+ } else {
+ VERBOSE (WARNING, fprintf (stdout, "invalid index (%d) [1, %d]\n", index, STORAGE_SIZE));
+ }
+ return 0;
+}
+
+void display (void)
+{
+ int i;
+ fprintf (stdout, "storage:");
+ for (i = 0; i < STORAGE_SIZE; i++) {
+ fprintf (stdout, " %g", storage[i]);
+ }
+ fprintf (stdout, "\n");
+}
+