From: "James C. Sewell"
Suggestion: Add integer arrays to SAL
Question 1: What is the range for BufferId()'s?
Question 2: What is the best way to emulate integer arrays?
Question 3: What is a better way to implement my function?
I need to set a flag on/off for each of the buffers in my ring.
GetBufferId() gives me a reference number for the buffer, but
that is a seemingly random number that starts out around 20 or
so... usually.
My first thought, before realizing the unpredictability of these
buffer numbers, was to have a string[10] and for each buffer set
string[buffer number] to "1" or "0". This works, but considering
the id's I'd have to make string's size really big and I prefer
not to do that. Besides that, what if a buffer id is bigger than
255 (the biggest string)... then my routine fails and someone loses
data. A Bad Thing.
Open to suggestions...
Jim
This answer, and my routine, may be a good tutorial in the near
future...
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|