Re: Possible bug.
Re: Possible bug.
- Subject: Re: Possible bug.
- From: Axel Luttgens <email@hidden>
- Date: Mon, 03 May 2004 22:42:30 +0200
Deivy Petrescu wrote:
At 10:23 PM -0700 5/2/04, Paul Berkowitz wrote:
On 5/2/04 8:43 PM, "deivy petrescu" <email@hidden> wrote:
[...]
[...]
[...]
You said "it doesn't say anything about 'number' or 'real', does it?
". Yes it does. You are interpreting script text in the narrowest
possible way.
According to AS "run script: Run a specified script or script file".
Well, 2^3+1 is a script according to my Script Editor, thus it is
fair game for run script script.
I believe Paul is right: command 'run script' expects a string or a file.
So, upon execution of 'run script <someexepression>', <someexpression>
get evaluated and:
- either it evaluates to a file: that file is read and its contents is
passed to 'run script' (a la osascript & Co),
- or it evaluates to something that is a string or that may be coerced
to a string: that string is passed to 'run script',
- neither of above: an error occurs, and 'run script' isn't even invoked
at all.
[...]
If you run the original in SE with the Event log window toggled on,
then you see
"x is 0.111111111"
Then you copy and paste 0.111111... and it runs fine.
But try this one now:
run script "0.111111111111111"
and you get the error again (and illustrate Chris' explanation).
What gets displayed in the log is not what 'run script' receives.
Must be a rather new behavior.
By typing and compiling in SE a line with more and more digits:
line entered line compiled
set x to 0.111111111111 set x to 0.111111111111
set x to 0.1111111111111 set x to 0.111111111111
set x to 0.11111111111111 set x to 0.111111111111
set x to 0.111111111111111 set x (and random crash)
As far as I remember, until recently, one could type lots of digits,
with the compiler just cutting at 12 decimals.
[...]
And Axel, this
run script ((1 / (2 ^ 3 + 1)) as string)
runs fine here. Are you still getting an error?
I'll leave that one for Paul ;-)
Paul Berkowitz wrote:
On 5/3/04 6:00 AM, "Axel Luttgens" <email@hidden> wrote:
[...]
Perhaps, but...
run script ((1 / (2 ^ 3 + 1)) as string)
--> Un(e) , ne peut pas se trouver aprhs ce numiro.
:-)
Which version of AS?
AS 1.9.3:
run script ((1 / (2 ^ 3 + 1)) as string)
--> 0.111111111111
First of all, sorry for having cut and pasted without thinking before;
above error message should of course have read:
--> Un(e) ", " ne peut pas se trouver après ce numéro.
Should be more legible that way. ;-)
I have AS 1.9.3 too. But,
2.0 as string
--> "2,0"
because of my international settings: I dare use a "," instead of a "."
as decimal separator.
Often very annoying.
But, unless I'm wrong, this has always been the case.
Axel
_______________________________________________
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.