The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



FormatData


Unit:SDL_stringl
Class: None
Declaration: function FormatData (data: double; NumWidth: integer; NDecP: integer): string;

The procedure FormatData converts the number contained in the parameter data to a string using either floating point or exponential notation (depending on the value of data ).

The procedure FormatData formats the value contained in the parameter data using the field width NumWidth and the number of decimal places NDecP. If the resulting formatted number would exceed more than 8 digits (including the decimal places), or the number is lower than the resolution given by the number of decimal places, then the procedure FormatData automatically switches to exponential notation, using NDecP decimal places.



Last Update: 2023-Feb-06