• 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: Understanding a repeat loop (strings/characters)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding a repeat loop (strings/characters)


  • Subject: Re: Understanding a repeat loop (strings/characters)
  • From: has <email@hidden>
  • Date: Sun, 23 Feb 2003 13:32:55 +0000

Paul Skinner wrote:

> Incorrect. The 'repeat with itemRef in val' structure iterates over an
> object's items. Both strings and lists have 'item' elements, so either
> may be used here. And since in strings 'item' is synonymous with
> 'character', what you end up with is a reference to each character.

Not according to the ASLG...
[snip]

ASLG's wrong by omission. A 'repeat with itemRef in val' statement will get the items of any AS value that can provide them (strings, Unicode text and a few other text types, and lists). This behaviour is quite intentional. (C Nebel confirmed this in an off-list exchange last year.) FWIW, you could always try filing a bug report on the ASLG in case it's ever revised.

has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
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.

  • Prev by Date: Re: Quark-group boxes
  • Next by Date: Re: Understanding a repeat loop (strings/characters)
  • Previous by thread: Re: Understanding a repeat loop (strings/characters)
  • Next by thread: Re: Understanding a repeat loop (strings/characters)
  • Index(es):
    • Date
    • Thread