Using AFIELDS() to Determine Number of Decimal PlacesLast reviewed: June 27, 1995Article ID: Q97156 |
The information in this article applies to:
SUMMARYThe "Commands & Functions" manual for FoxPro 2.0 for MS-DOS and the "FoxPro Language Reference" manual for FoxPro 2.5 for MS-DOS and Windows do not list an example of using the AFIELDS() function. The following example illustrates how the AFIELDS() function can be used to help determine the number of decimal places in a field named numfld.
MORE INFORMATIONIn the code snippet below, AFIELDS() is used to create an array containing field information. The array contains four columns: field name, field type, field length, and decimal places in numeric fields. One row in the array is created for each field in the database structure. The field names and field types are placed in the array as uppercase character strings. The ASCAN() function scans the fldinfo array to find the field named numfld and returns the element number for the field name. The number of decimal places for the field is three elements past the field name.
REFERENCESPages C3-126 and C3-144 of the FoxPro 2.0 for MS-DOS, "Commands & Functions".Pages L3-182 and L3-206-207 of the FoxPro 2.5 for MS-DOS and Windows "Language Reference". |
Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |