• 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: Same code gives different answers in 2 different scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Same code gives different answers in 2 different scripts


  • Subject: Re: Same code gives different answers in 2 different scripts
  • From: Shane Stanley <email@hidden>
  • Date: Thu, 04 Jun 2009 17:03:14 +1000
  • Thread-topic: Same code gives different answers in 2 different scripts

On 4/6/09 10:19 AM, "Chris Page" <email@hidden> wrote:

> So, although the ³round² command could have an option to control the
> precision (i.e., the ³maximum precision²), there is no meaningful
> ³minimum precision² option. ³round² performs a calculation, it does
> not generate formatted string representations of floats.
>
> If you need support in AppleScript for generating formatted strings,
> please post an enhancement request (if you haven¹t already) and
> include specific details about the sort of controls you need.

An AS equivalent to printf would be nice, but it seems to me that extending
the round command might be better, because I suspect most rounding is done
preparatory to display/storage as a string. So a form like:

 round x decimal places 2 with zero padding as text

might fit the bill, without the need to add another command (and call to a
scripting addition).

--
Shane Stanley <email@hidden>
AppleScript Pro Sessions <http://scriptingmatters.com/aspro>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Same code gives different answers in 2 different scripts
      • From: Chris Page <email@hidden>
References: 
 >Re: Same code gives different answers in 2 different scripts (From: Chris Page <email@hidden>)

  • Prev by Date: Re: AppleScript Studio Application - Annoying Delays - Withdrawn
  • Next by Date: VOTE on formatted strings for AppleScript
  • Previous by thread: Re: Same code gives different answers in 2 different scripts
  • Next by thread: Re: Same code gives different answers in 2 different scripts
  • Index(es):
    • Date
    • Thread