• 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: "Daniel A. Shockley" <email@hidden>
  • Date: Sun, 23 Feb 2003 23:26:16 -0500

Let's think about things from this point of view. The "piece of string" metaphor is a bad one. The smallest unit a string is hard to measure: at what point is it no longer a "piece of string" but a bit of carbonaceous matter? An AppleScript string is, however, a bunch of characters joined together. That's what a word, paragraph, or whatever is in real life. Saying that a single character is an item of a string is the most accurate thing.

Using "text items" allows you to specify what you consider a "text item" to be, but a single character is the inherent "item" of a string. A character is a single quanta of a string. Any other interpretation depends, as you say, on context.

As I am sure Has and others will attest to, I don't consider the ability to
get an "item" of a string (returning a character) a feature. Again, because
it exposes the ugliness of C strings. And since the synonymous expression
"character" already exists, "item" then becomes superfluous. And if "item"
is then up for grabs, why not make it synonymous with "text item" -- a
user-definable, dynamic, and truly useful term?

How long is a piece of string?
Is it 3 feet?
Is it 36 inches?
Is it half a spool?
Or is it 34,567 individual fibres?

The best answer should obviously depend on the context.

--
----
Daniel A. Shockley
email@hidden
email@hidden
http://www.danshockley.com
_______________________________________________
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: Fwd: Modifying a .plist file
  • 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