Strings and the like.
- Posted by "Lucius L. Hilley III" <lhilley at CDC.NET> Dec 08, 1999
- 546 views
What if something like these were built-in? ----------------------------------- type whole_number_set(sequence s) for A = 1 to length(s) do if (s[A] = floor(s[A])) then return 0 end if end for return 1 end type ----------------------------------- Then you would be able to specify any range and test it effeciently such as a byte_set() below. Of course, these sets are enforcing that you have a one dimensional sequence. But that is the whole point of detecting strings. ----------------------------------- type byte_set(sequence s)-- I.E.: standard ASCII byte STRING !!! sequence temp if whole_number_set(s) then temp = ((s >= 0) and (255 > s)) return (find(0, temp) = 0) else return 0 end if end type ----------------------------------- Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+