1. A sequence, by any other name
- Posted by Jonas Temple <jktemple at yhti.net> Feb 27, 2001
- 375 views
Hello all, What I need is a sure-fire way to determine in my program if a sequence is a character sequence versus a sequence of numbers. I need to determine this dynamically. Maybe this is a basic question? I dunno. Jonas
2. Re: A sequence, by any other name
- Posted by codehead78 at YAHOO.COM Feb 27, 2001
- 382 views
type string(sequence x) return find(0,x > 255 and x < 0) end type it doesn't check if it's not a sequence though... --- Jonas Temple <jktemple at yhti.net> wrote: > Hello all, > > What I need is a sure-fire way to determine in my > program if a sequence > is a character sequence versus a sequence of > numbers. I need to > determine this dynamically. > > Maybe this is a basic question? I dunno. > > Jonas Hope this is what you're looking for, -Humberto
3. Re: A sequence, by any other name
- Posted by codehead78 at YAHOO.COM Feb 27, 2001
- 371 views
--- codehead78 at YAHOO.COM wrote: > type string(sequence x) > return find(0,x > 255 and x < 0) > end type > Oops, that should be return not find(0,x > 255 and x < 0) > it doesn't check if it's not a sequence though... > > --- Jonas Temple <jktemple at yhti.net> wrote: > > Hello all, > > > > What I need is a sure-fire way to determine in my > > program if a sequence > > is a character sequence versus a sequence of > > numbers. I need to > > determine this dynamically. > > > > Maybe this is a basic question? I dunno. > > > > Jonas > > Hope this is what you're looking for, > -Humberto
4. Re: A sequence, by any other name
- Posted by Irv Mullins <irvm at ellijay.com> Feb 27, 2001
- 389 views
On Tue, 27 Feb 2001, Jonas wrote: > Hello all, > > What I need is a sure-fire way to determine in my program if a sequence > is a character sequence versus a sequence of numbers. I need to > determine this dynamically. > > Maybe this is a basic question? I dunno. > > Jonas Depending upon the numbers involved, it may be impossible: Consider, for example: sequence s s = {65,66,67,68} puts(1,s) -- gives ABCD ? s -- gives {65,66,67,68} Now, 64, 65... etc are perfectly valid numbers, but they may also be valid characters. It's up to the programmer to keep track of what those numbers are supposed to represent at any given time. Regards, Irv