Re: 'to' as a handler parameter label
Re: 'to' as a handler parameter label
- Subject: Re: 'to' as a handler parameter label
- From: email@hidden
- Date: Mon, 15 Jan 2001 22:24:11 -0500
On Mon, 15 Jan 2001 01:41:28 +0000, Nigel Garvey <email@hidden>
asked,
>
The expression 'to' works as a parameter label for a handler:
>
>
on blibble to n
>
beep n
>
end blibble
>
>
blibble to 8
>
>
...but it isn't mentioned in the sacred texts as being one of the
>
Twenty-Four Allowable Labels. Is it Allowed? If not, what's happening
>
here? It doesn't seem to be a synonym for 'on', as it compiles like a
>
label rather than like an AppleScript keyword.
Its in the AppleScript 1.3.7 (MacOS 8.6) English Dialect file, as one of the
keywords for the "Call*Subroutine" command. There is never any problem telling
a language command (which the subroutine definitions look like) from a command's
keyword. One always appears at the beginning of a line, and the other only
appears in the keyword part of a subroutine definition or call.
Can you use it safely, or will your code go the way of the dinosaur, like if you
were to use, "item -1 to 0 of x"? Not sure. Its undocumented, so it might go
away without warning.
Sidelight: while looking for any chance that this was documented, I came across
Apple's definition of inches as 39.3700787... inches to the meter. In US law,
the meter is 39.37 inches exactly, as it was codified in the US Metric Law of
1866. Maybe the "Imperial" inch Apple provides is correct in Canada and the UK.
Since the 39.37-inch meter is provided in IEEE Std 268, they'll probably
address the non-IEEE inch the way they addressed non-IEEE rounding modes. Look
for "meters 1 as inches as used in Canada" :-)
--
Scott Norton Phone: +1-703-299-1656
DTI Associates, Inc. Fax: +1-703-706-0476
2920 South Glebe Road Internet: email@hidden
Arlington, VA 22206-2768 or email@hidden