>>>How can I check in a program the width of a table field?
>>
>>FSIZE(cFieldName [, nWorkArea | cTableAlias] | cFileName)?
>
>remember:
>
>The current setting of SET COMPATIBLE determines if FSIZE( ) returns the size of a field or a file. If SET COMPATIBLE is set to OFF or FOXPLUS (the default), FSIZE( ) returns the size of a field. If SET COMPATIBLE is set to ON or DB4, FSIZE( ) returns the size of a file.
You are correct. I assume people always read the help for details. Here is what Hacker's Guide to VFP has to say:
"FSIZE() is a horror show. Fox Software and Ashton-Tate each went its own way with this function—it's one of the few that is affected by the dreaded SET COMPATIBLE command. If SET COMPATIBLE is OFF or FOXPLUS, FSIZE() returns the field size of the specified field. If FSIZE() is called with SET COMPATIBLE STUPID, er, we mean, ON or DB4, it returns the size of the specified file. Our advice: leave COMPATIBLE SMART (FoxPlus) and use ADIR() to get file sizes."
Doru