把字节数显示成kb或gb的函数
摘要:
functionFormatByteSize(constbytes:Longint):string;constB=1;//byteKB=1024*B;//kilobyteMB=1024*KB;//megabyteGB=1024*MB;//gigabytebeginifbytes>GBthenresult:=FormatFloat('#.##GB',bytes/GB)elseifbytes>MBthenresult:=FormatFloat('#.##MB',bytes/MB)elseifbytes>KBthenresult:=FormatFlo 阅读全文
posted @ 2011-06-17 22:38 jxgxy 阅读(330) 评论(0) 推荐(0) 编辑