MACSCRPT Archives

April 2013

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Andreas Kiel <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 12 Apr 2013 12:30:08 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
Hi Mark,

This annoying error has been around since a long time.
I always converted "text numbers" to "real numbers" and did check the decimal divider used with the current system.
You can figure out that with a short test
set testDiv to 1/2
The result may be 0.5 or 0,5

- Andreas

On Apr 8, 2013, at 8:05 PM, Mark Lively wrote:

> Since there has been some activity I want to share this warning.
> 
> In older version of Applescript (before 10.7)
> 
> set n to "4.1"
> set n to -n
> 
> would yield -4.1
> 
> Under 10.7 and 10.8 it yields -4
> 
> It seems the default coercion is to integer rather than number.
> 
> bizarrely, 
> 
> set n to -1 * n 
> 
> yields -4.1
> 
> -Mark
> Fixed my code, Documented my fixes, Filed a bug report.

ATOM RSS1 RSS2