• 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
Don't test s="" [was Re: Strange string test error]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Don't test s="" [was Re: Strange string test error]


  • Subject: Don't test s="" [was Re: Strange string test error]
  • From: Emmanuel <email@hidden>
  • Date: Thu, 12 Dec 2002 20:56:02 +0100

I just restate the conclusion of the latest posts, so that it be clear for as many people as possible:

Do not test for an empty string:

----------------------
if (s = "") -- don't do that
----------------------

unless you know for sure that s is a shorter string than 32K.

Instead, test for a null length, it's safer.

----------------------
if (s's length = 0) -- do that instead
----------------------

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Don't test s="" [was Re: Strange string test error]
      • From: Paul Berkowitz <email@hidden>
    • Re: Don't test s="" [was Re: Strange string test error]
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Strange string test error (From: julifos <email@hidden>)

  • Prev by Date: Quark Problem (Simon)
  • Next by Date: Newbie withn problems
  • Previous by thread: Re: Strange string test error
  • Next by thread: Re: Don't test s="" [was Re: Strange string test error]
  • Index(es):
    • Date
    • Thread