CT_FIELDDECI

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: FCOUNT, FIELDNUM, FIELDNAME, FIELDTYPE, FIELDSIZE, DBF Structure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.