[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FIELDDECI()
Determines the number of decimal places in a field
------------------------------------------------------------------------------
Syntax
FIELDDECI(<nField>) --> nDecimalPlaces
Argument
<nField> Designates for which numeric data field to determine the
number of decimal places.
Returns
When a field number is valid, FIELDDECI() returns the number of decimal
places in a numeric data field.
Description
It is important to know how many decimal places are in a data field so
you can limit the input of significant digits in the corresponding
number. FIELDDECI() determines the number of decimal places available.
This allows you to tailor inputs to the database without changing the
program.
Note
. If you have an invalid field number, the function returns a
value of 0.
Example
Convert the second field to a string with the correct number of decimal
places:
@ 0, 60 SAY "Price: " + STR(cField2, 8, FIELDDECI(2))
See Also:
FIELDSIZE()
FIELDTYPE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson