Bob Sneidar wrote:
> I got ahold of a function someone wrote years ago called fwGestalt(). It
> looks to
> provide information about the current application it belongs to in a report.
> However it is calling a function called Bytes2Size() which apparently converts
> hard drive space from bytes to actual free space. Does anyone have the
> byte2Size()
> function?
That was me (I use the "fw" prefix to distinguish "Fourth World" library stuff).
Here ya' go:
function Bytes2Size n
set the numberformat to "0.#"
if n < 1024 then put n &" bytes" into n
else
put n / 1024 into n
if n < 1024 then put n &" k" into n
else
put n / 1024 &" MB" into n
end if
end if
return n
end Bytes2Size
Things have changed since I wrote that. Might be good to update all the way up
to TB.
Richard Gaskin
FourthWorld.com
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode