/ Forums / Advansys Formativ / Creating Solutions with Formativ / decimals in text fields or masked fields / Reply To: decimals in text fields or masked fields

#7563
Support 1
Participant

In general, programming languages store floating-point numbers in approximate form. This means the value that you write to a floating-point variable X may be slightly different to the value that you read from X.

The VBScript function Round() may be what you are looking for. Here is a sample of usage:

  field3.text = Round(x, 2)

For more information on the inexactness of floating-point representation in computing, see http://en.wikipedia.org/wiki/Floating_Point#Problems_with_floating-point.

Regards,
Advansys Support