Changeset 75 for trunk/Packages/Common/PrefixMultiplier.pas
- Timestamp:
- Jun 4, 2024, 12:22:49 AM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/PrefixMultiplier.pas
r74 r75 1 unit UPrefixMultiplier;1 unit PrefixMultiplier; 2 2 3 3 // Date: 2010-06-01 4 5 {$mode delphi}6 4 7 5 interface … … 21 19 { TPrefixMultiplier } 22 20 23 TPrefixMultiplier = class 21 TPrefixMultiplier = class(TComponent) 24 22 private 25 function TruncateDigits(Value: Double;Digits:Integer=3):Double;23 function TruncateDigits(Value: Double; Digits: Integer = 3): Double; 26 24 public 27 25 function Add(Value: Double; PrefixMultipliers: TPrefixMultiplierDef; … … 33 31 ( 34 32 (ShortText: 'y'; FullText: 'yocto'; Value: 1e-24), 35 33 (ShortText: 'z'; FullText: 'zepto'; Value: 1e-21), 36 34 (ShortText: 'a'; FullText: 'atto'; Value: 1e-18), 37 35 (ShortText: 'f'; FullText: 'femto'; Value: 1e-15), … … 54 52 ( 55 53 (ShortText: 'ys'; FullText: 'yocto'; Value: 1e-24), 56 54 (ShortText: 'zs'; FullText: 'zepto'; Value: 1e-21), 57 55 (ShortText: 'as'; FullText: 'atto'; Value: 1e-18), 58 56 (ShortText: 'fs'; FullText: 'femto'; Value: 1e-15), … … 72 70 ); 73 71 72 procedure Register; 73 74 74 75 implementation 76 77 procedure Register; 78 begin 79 RegisterComponents('Common', [TPrefixMultiplier]); 80 end; 75 81 76 82 { TPrefixMultiplier } … … 92 98 end; 93 99 94 function TPrefixMultiplier.Add(Value: Double;PrefixMultipliers:TPrefixMultiplierDef95 ; UnitText:string;Digits:Integer):string;100 function TPrefixMultiplier.Add(Value: Double; PrefixMultipliers: TPrefixMultiplierDef 101 ; UnitText:string; Digits: Integer): string; 96 102 var 97 103 I: Integer; … … 118 124 119 125 end. 120
Note:
See TracChangeset
for help on using the changeset viewer.