Re: Impossible "If"?
Re: Impossible "If"?
- Subject: Re: Impossible "If"?
- From: Andy Wylie <email@hidden>
- Date: Sun, 20 May 2001 01:45:54 +1200
on 19/5/01 7:41 PM, Paul Berkowitz at email@hidden wrote:
>
On 5/18/01 10:16 PM, "email@hidden" <email@hidden> wrote:
>
>
> instead, do this
>
>
>
> if length of myString is equal to "" then
>
> -- do stuff for the case where the string is empty
>
> end if
>
>
>
> While this does throw an error, it's not intuitive what the workaround is.
>
> Now you know.
>
>
>
Hmmm. What happens if you write
>
>
if length of myString is equal to 0 then
>
-- do stuff for the case where the string is empty
>
end if
>
>
>
Why should length of a string equal "" (a string, not an integer, except as
>
coerced to 0)?
>
if length of "" is not equal to "" then say "wazaaaaaaaahp" using "Junior"
if 0 is not equal to "any string" then say "true" using "Junior"
if 0 is greater than or equal to "" then say "true" using "Junior"
if 0 is less than or equal to "" then say "true" using "Junior"
I can't imagine I'd ever run into that one but who knows and it's nice to be
aware of thanks JW.
Possibly a trap, replacing spaces with underscores the behavior of these
three is curious {modification_date, creation_date, file_type}, they
maintain keyword colouring and won't compile but in lists of one or more
items and work ok but not understanding or wanting to tempt fate I've
avoided using them.
_____________________________ Andy