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


Declaration:function MakeEFormat (x:double; w,d: integer): string;

Since the exponential notation of numeric values differ between FORTRAN and Pascal there may be some problems when it comes to exchange data between FORTRAN and Pascal programs. The function MakeEFormat provides a partial remedy for this situation.

The parameters w and d determine the width of the numeric field and the number of decimal places. w may take values between 8 and 40, d between 2 and 15. If a conflict arises from the actual values of w and d, the parameter w is automatically adjusted in a way that all decimal places d can be output correctly.

Hint: The output with only one decimal place is not possible.

Example: The statement "writeln (MakeEFormat (0.0236,16,5);" displays the number 0.0236 as ' 0.23600E-01'.

Last Update: 2013-Dez-06