| View previous topic :: View next topic |
| Author |
Message |
Jeffrey Newbie
Joined: 08 May 2002 Posts: 1 Location: U.S.A. Arizona
|
Posted: Thu May 09, 2002 4:18 am Post subject: Convert @file(*,z) bytes into k or megabytes |
|
|
I am lost big time when it comes to math. Can anyone help me with this problem?
Thanks,
Jeffrey _________________ Jeffrey |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Thu May 09, 2002 4:41 am Post subject: |
|
|
For bytes to Kilobytes divide by 1024. For bytes to MB and so on just add 3 0's.
To round them off use @FORMAT():
| Code: |
%%Kilobytes = @FDIV(126287,1024)
%%Megabytes = @FDIV(12628778,1024000)
%%RoundedK = @FORMAT(@FDIV(126287,1024),0)
%%RoundedMB = @FORMAT(@FDIV(12628778,1024000),0)
info %%Kilobytes K@CR()%%Megabytes MB@CR()%%RoundedK K@CR()%%RoundedMB MB
|
*Note: I'm not sure if 1024000 is right for Megabytes but it's close..anybody correct me on that?*
Good luck. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu May 09, 2002 6:47 am Post subject: |
|
|
kilobyte = 1024 bytes
megabyte = 1,048,576 bytes (1024 kilobytes)
gigabyte = 1,073,741,824 bytes (1024 megabytes)
terabyte = 1,099,511,627,776 bytes (1024 gigabytes)
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|