Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - setdecimals() set the decimals value http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setdecimals()       Set the decimals value
------------------------------------------------------------------------------
 Declaration
   getset.hdr

 Syntax
   proc setdecimals extern
   param value int iDecimals

 Arguments
   iDecimals is the new decimals value.

 Return
   None.

 Description
   The setdecimals() function sets the decimals to the value of the
   passed parameter.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_setdecimals
   vardef
      uint n
   enddef
   set fixed on
   ? getdecimals()                       // prints 2
   ?
   for n := 0 to 15
      setdecimals( n )
      ? getdecimals(), 12.345678901234
   next
   endproc

   proc main
   Test_setdecimals()
   endproc

See Also: getsetdecimals()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson