CodeCentral Submissions for John Hardy
http://codecentral.embarcadero.com/
CodeCentral Submissions for John HardyFormat numbers to fixed, Engineering and Scientific notationThe attached unit and demo program gives the source code for a unit that formats your calculated results into one of the typical formats found on a calculator. The two public methods take a real number, or string representation of the number and format the result, to a given precision and type. The possible types are fixed, scientific and engineering. Fixed tries to diplay the number without an exponential, scientific alway a single digit followed by a decimal place and precicision and finally engineering make the exponential a multiple of three.
http://codecentral.embarcadero.com/Item/26760
2009-03-23T10:17:292009-03-23T10:17:29http://codecentral.embarcadero.com/Item/26760