• 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: How do I format a number or Round a number?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I format a number or Round a number?


  • Subject: Re: How do I format a number or Round a number?
  • From: Arthur Knapp <email@hidden>
  • Date: Mon, 13 Oct 2003 10:17:32 -0400

Subject: Re: How do I format a number or Round a number?
Date: Sat, 11 Oct 2003 15:18:54 +0100
From: Nigel Garvey <email@hidden>

-- convertByteSize -- by Nigel Garvey & Richard Morton, 2002 --

to convertByteSize from theRawSize
...
if theRawSize >= oneGB then
((theRawSize / oneGB * ((10 ^ 0.5) ^ 2) div 0.1 / 100) as string) & " GB"

This can't properly be considered a joint production with Nigel Garvey until
we add a Garvey-Statement:

...
tell theRawSize to if it >= oneGB then
((it / oneGB * ((10 ^ 0.5) ^ 2) div 0.1 / 100) as string) & " GB"
else if it >= oneMB then
((it / oneMB * ((10 ^ 0.5) ^ 2) div 0.1 / 100) as string) & " MB"
else if it >= oneK then
((it div oneK) as string) & " KB"
else
return (it as string) & " bytes"

;-)

{ Arthur J. Knapp;
<mailto:email@hidden>;

What...? Oh...!
}
_______________________________________________
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.

  • Prev by Date: Re: How do I get the IP address of an interface via applescript?
  • Next by Date: Re: get seconds
  • Previous by thread: Re: How do I format a number or Round a number?
  • Next by thread: Re: How do I format a number or Round a number?
  • Index(es):
    • Date
    • Thread