Re: type string

new topic     » topic index » view thread      » older message » newer message

Daniel Berstein <daber at PAIR.COM> wrote:

>Here's my record breaking string type check:
>
>global type string5(object s)
>    object c
>    if not sequence(s) then
>        return 0
>    end if
>    for j = 1 to length(s) do
>        c = s[j]
>        if sequence(c) or floor(c/255) or not c then
>            return 0
>        end if
>    end for
>    return 1
>end type

Um...this routine allows the "string" to be a sequence of floating-point
values...

? string5({2.71828, 3.14159}) -- returns TRUE!


 -- Gabriel Boehme

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu