Part of the Samples Website. 8/16/97.

samples.basicStuff.megabyteString

«Shows you how to display sizes in megabytes
«the next step after string.kBytes
on megabyteString (size)
leftofdecimal = size / (1024 * 1024)
rightofdecimal = string (size % (1024 * 1024) / (1024.0 / 10))
if sizeOf (rightofdecimal) > 1
rightofdecimal = rightofdecimal [1]
s = leftofdecimal + "." + rightofdecimal
return (s + " MB")
dialog.alert (megabyteString (memAvail ()) + " free")


This page was last built on Sat, Aug 16, 1997 at 6:37:54 PM. You can download the current set of sample scripts from our FTP site. Dave