• 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: String-to-constant coercions (was Bug in OS 9.2.1/2 S 1.6-1.8.2b? and Set t to true as boolean)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String-to-constant coercions (was Bug in OS 9.2.1/2 S 1.6-1.8.2b? and Set t to true as boolean)


  • Subject: Re: String-to-constant coercions (was Bug in OS 9.2.1/2 S 1.6-1.8.2b? and Set t to true as boolean)
  • From: Kai Edwards <email@hidden>
  • Date: Sat, 23 Feb 2002 20:55:16 +0000

on Fri, 22 Feb 2002 15:03:27 -0500, Rich Baker <email@hidden> wrote:

> Try:
>
> set t to "true" as constant

Well that works for me (see first line of the list below)!

Hmmm... Very interesting, Rich - especially when one looks a little deeper
at the way other string-to-constant coercions behave...

As before, the following tests were also carried out on an older system (OS
8.1/AS 1.1.2) - with all 'foreign' osaxen removed (and yes - with a reboot).

The lines preceded by "*" simply flag coercions that returned something:

-----------------------------------------------------------------------

* "true" as constant --> true
"false" as constant --> Can't make "false" into a constant.

* not "true" as constant --> false
* not ("true" as constant) --> false --(how the line above is evaluated?)
"not true" as constant --> Can't make "not true" into a constant.
(not "true") as constant --> Can't make "true" into a boolean.

* "bold" as constant --> bold
"plain" as constant --> Can't make "plain" into a constant.
"italic" as constant --> Can't make "italic" into a constant.
"all caps" as constant --> Can't make "all caps" into a constant.

* "name" as constant --> named
"named" as constant --> Can't make "named" into a constant.

"yes" as constant --> Can't make "yes" into a constant.
"no" as constant --> Can't make "no" into a constant.
"ask" as constant --> Can't make "ask" into a constant.

* "file" as constant --> +constant ****file;
* "disk" as constant --> +constant ****disk;
"alias" as constant --> Can't make "alias" into a constant.
"folder" as constant --> Can't make "folder" into a constant.
"window" as constant --> Can't make "window" into a constant.

* "real" as constant --> +constant ****real;
"integer" as constant --> Can't make "integer" into a constant.
"number" as constant --> Can't make "number" into a constant.

* "long" as constant --> +constant ****long;
"short" as constant --> Can't make "short" into a constant.

* "text" as constant --> +constant ****text;
"string" as constant --> Can't make "string" into a constant.

* "list" as constant --> +constant ****list;
"record" as constant --> Can't make "record" into a constant.

* "item" as constant --> +constant ****item;
"items" as constant --> Can't make "items" into a constant.
"text item" as constant --> Can't make "text item" into a constant.
"text items" as constant --> Can't make "text items" into a constant.
"length" as constant --> Can't make "length" into a constant.

* "word" as constant --> +constant ****word;
"character" as constant --> Can't make "character" into a constant.
"paragraph" as constant --> Can't make "paragraph" into a constant.

* "data" as constant --> +constant ****data;

* "date" as constant --> +constant ****date;
* "time" as constant --> time

* "year" as constant --> year
"day" as constant --> Can't make "day" into a constant.
"month" as constant --> Can't make "month" into a constant.
* "week" as constant --> weeks

* "days" as constant --> days
"weeks" as constant --> Can't make "weeks" into a constant.

"seconds" as constant --> Can't make "seconds" into a constant.
"minutes" as constant --> Can't make "minutes" into a constant.
"hours" as constant --> Can't make "hours" into a constant.

-----------------------------------------------------------------------

Curiouser and curiouser...

I haven't yet tried testing on a later system for comparison (but feel free,
folks!) ;-)

There may be a perfectly rational explanation for some results but - as for
the rest - well, I'm still trying to work it all out!) 8-P

Kai

--

**********************************
Kai Edwards Creative Resources
1 Compton Avenue Brighton UK
Telephone +44 (0)1273 326810
**********************************
_______________________________________________
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: String-to-constant coercions (was Bug in OS 9.2.1/2 S 1.6-1.8.2b? and Set t to true as boolean)
      • From: Emmanuel <email@hidden>
  • Prev by Date: accessing the XML
  • Next by Date: Import from Outlook Express to Filemaker (mac) - modification
  • Previous by thread: re: accessing the XML
  • Next by thread: Re: String-to-constant coercions (was Bug in OS 9.2.1/2 S 1.6-1.8.2b? and Set t to true as boolean)
  • Index(es):
    • Date
    • Thread