Re: How do I format a number or Round a number?
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.