Karl Blessing
Programmer
on my Webbased email I've been writing, I have a routine that takes the size(which is in bytes) , and converts it to a more friendly format (showing, b, kb, mb)
I'm just wondering if I am using the right key numbers and deviders
I have it based around binary , 256->512->1024->2048, so forth, so I assume that 1024 megs = 1 Gig, 1024 kb = 1 Meg, 1024 Bytes = 1 Kb Karl Blessing aka kb244{fastHACK}
I'm just wondering if I am using the right key numbers and deviders
Code:
<%
Size = Cint(msg.Size)
if size < 1024 then
Sizer = Size & "b"
elseif size > 1024 and size < 1024000 then
Sizer = FormatNumber((Size/1024),2) & "Kb"
elseif size > 1048576 then
Sizer = FormatNumber(((Size/1024)/1024), 2) & "Mb"
end if
%>
I have it based around binary , 256->512->1024->2048, so forth, so I assume that 1024 megs = 1 Gig, 1024 kb = 1 Meg, 1024 Bytes = 1 Kb Karl Blessing aka kb244{fastHACK}