Re: FileMaker styled text [part 1 of 2]
Re: FileMaker styled text [part 1 of 2]
- Subject: Re: FileMaker styled text [part 1 of 2]
- From: John W Baxter <email@hidden>
- Date: Mon, 23 Jun 2003 21:01:02 -0700
- Envelope-to: email@hidden
At 3:34 +0100 6/23/2003, Kai wrote:
>
More interestingly, we can also do something like this:
>
>
--------------------------
>
>
set {a, b, c, d} to "goodbye"
>
{a, b, c, d} as string
>
--> "good"
>
>
--------------------------
>
>
Here, because the target of the set command is a list, the string "goodbye"
>
is 'silently' coerced to a list of the string's items (characters). Since
>
only 4 values are required by the target list, {a, b, c, d}, only the first
>
4 items of the source list, {"g", "o", "o", "d"}, are assigned.
Another case in which a "left over" text item delimiter setting will cause
a surprise until fixed. That's two commands in a row whose outcome depends
on the value of the text item delimiters. The final result could easily be
"goodbye" (it would take rather odd TID settings to get something else).
And if this code is reached through multiple paths, only the rare one of
which sets TIDs (eg, February 29 handling)...
Of course, the set TID just before using folks will see this one coming.
--John
--
John Baxter email@hidden Port Ludlow, WA, USA
_______________________________________________
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.