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....



SigDigStr


Unit:SDL_stringl
Class:None
Declaration:function SigDigStr (data: double; Width, NSigDig: integer): string;

The function SigDigStr converts the numerical value data into a string of length Width showing NSigDig significant digits. (Note the difference between number of decimal places and number of significant digits).

Hint: The number of significant digits is not restricted if data is greater than 10NSigSig.

Example: Assuming x to be 23.725821 the statement astr := SigDigStr(x,10,5); assigns the string '    23.726' to the variable 'astr'. The length of astr is 10, the value of x is rounded to 5 significant digits.



Last Update: 2008-Okt-29