Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with FSIZE()
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00393504
Message ID:
00393531
Views:
15
>>
>>You will get 4 with an Integer type field because an integer is store as a 4-byte binary value. If you want the number of digits stored in a integer type field you might try Len(AllTrim(Str(fieldname))). This will get the number of digits.
>>
>>Hope this helps.
>
>Yes this works. But now I remember why I did not use this: I loose the decimals in this case. Some fields have decimals (normally two), others not. How can I determine whether a field has decimals? When I know this, I can use STR(fieldname,NrOfDecimals) and the problem is solved.

Use AFIELDS() to populate an array. It'll contain the total width of the field and the number of decimal places, if applicable.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform