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 - -c<x> const num type <b|i|u|l|n|d> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 -C<x>               Const num type <b|i|u|l|n|d>
------------------------------------------------------------------------------
 Syntax
   -Cb|i|u|l|n|d

 Arguments
   b sets the default numeric constant type to byte.
   i sets the default numeric constant type to int.
   u sets the default numeric constant type to uint.
   l sets the default numeric constant type to long.
   n sets the default numeric constant type to ulong.
   d sets the default numeric constant type to double.

 Default
   Dependent on the magnitude of the individual constants.

 Description
   The -C switch sets the default type of numeric constants.
   Casting the type of numeric constants is frequently important to
   avoid losses in precision, and to get correct results in comparisons.

   When a numeric constant is encountered in the source, the compiler
   sets its type according to the magnitude of the number. For example,
   a small integer under the value of 128 is treated as a byte, while
   constants between 128 and 65535 are treated as uints.

   The default behavior can be changed with the -C switch. If, for example,
   the -Cu option is used, then numerics below 128 will be considered to be
   uints, although based on their magnitude they would be treated as bytes.
   The opposite, however is not true: constants that are recognized as
   double precision values from their characteristics will not be
   degraded to uints. Constant numerics that are individually typized
   using the number casting modifiers are not converted either.

 Example
   . Constant numerics are bytes by default.
   
     force.exe test.prg
   
   . Constant numerics are uints.
   
     force.exe -Cu test.prg
   
   . Constant numerics are doubles.
   
     force.exe -Cd test.prg

See Also: numeric

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