• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Impossible "If"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Impossible "If"? (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: directory listing
  • Next by Date: Re: Re: Impossible "If"?
  • Previous by thread: Re: Impossible "If"?
  • Next by thread: Re: Re: Impossible "If"?
  • Index(es):
    • Date
    • Thread