Groovy hepcat Alex Walker jived with All on 06 Dec 97 16:33:48!
Finding the end of an array?'s a cool scene. Dig it!
AW> Just wondering, if an array is passed to a function, is there a
AW> way to test for or find the end of the array without having the
AW> size of the array passed to the function?
AW> If it's a char string one could search/test for the null
AW> character, but what if it's an array of integers?
Use a dummy value. That's really all a terminating null is on a
string, after all. The dummy value could be anithing you're sure won't
occur in your data, for example: 0, INT_MAX, INT_MIN, UINT_MAX, etc..
Wolvaen
... You know what I hate about the deaf? You can't tell them anithing.
--- Blue Wave/RA v2.20
---------------
* Origin: The Gate, Melbourne Australia, +61-3-9809-5097 33.6k (3:633/159)
|