| |||||||||||||||||
Output formatting Description The printing format for real numbers may be changed individually with the functions strfmt, textfmt, formattext or by resetting the parameter REALFMT. The function strfmt may also be applied to strings, for instance to change the alignment of the text. Further explanation of this example: 'Mosel User Guide', Sections 10.1 Producing formatted output and 10.3 Real number format
Source Files By clicking on a file name, a preview is opened at the bottom of this page.
Data Files fo.mos (!****************************************************** Mosel User Guide Example Problems ================================= file fo.mos ``````````` Formatted output printing. (c) 2008 Fair Isaac Corporation author: Bob Daniel, 2002 *******************************************************!) model FO parameters r = 1.0 ! A real i = 0 ! An integer end-parameters writeln("i is ", i) writeln("i is ", strfmt(i,6) ) writeln("i is ", strfmt(i,-6) ) writeln("r is ", r) writeln("r is ", strfmt(r,6) ) writeln("r is ", strfmt(r,10,4) ) end-model | |||||||||||||||||
© Copyright 2024 Fair Isaac Corporation. |