Changeset 75 for oup/current/Code
- Timestamp:
- Jan 12, 2007, 12:36:52 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Code/Functions.pas
r74 r75 213 213 214 214 function FormatFileSize(size: LongWord): String; 215 begin 215 var 216 floatformat: TFormatSettings; 217 begin 218 floatformat.DecimalSeparator := '.'; 216 219 if size >= 1000 * 1024 * 1024 then 217 220 begin 218 Result := FloatToStrF(size / 1024 / 1024 / 1024, ffFixed, 5, 1 ) + ' GB';221 Result := FloatToStrF(size / 1024 / 1024 / 1024, ffFixed, 5, 1, floatformat) + ' GB'; 219 222 end 220 223 else … … 222 225 if size >= 1000 * 1024 then 223 226 begin 224 Result := FloatToStrF(size / 1024 / 1024, ffFixed, 5, 1 ) + ' MB';227 Result := FloatToStrF(size / 1024 / 1024, ffFixed, 5, 1, floatformat) + ' MB'; 225 228 end 226 229 else … … 228 231 if size >= 1000 then 229 232 begin 230 Result := FloatToStrF(size / 1024, ffFixed, 5, 1 ) + ' KB';233 Result := FloatToStrF(size / 1024, ffFixed, 5, 1, floatformat) + ' KB'; 231 234 end 232 235 else
Note:
See TracChangeset
for help on using the changeset viewer.