>I've read in VFP documentation that bintoc function may be used to reduce size of indexes. I've tested without success: bintoc(1) returns the same string than bintoc(2), 3, 4 etc. So how can be used to order records?
>What i'm forgeting?
>Thanks
It creates a four-byte string which can be concatenated with others. It probably makes indexes much shorter than when you use numeric indexes; though, it ignores the decimal part, but then - a numeric index rarely has one, does it?
The real gain is when you have had an index on two numeric fields, like
inde on str(numfield1)+str(numfield2)
if these fields had some decimals or length of 6 or more digits, the resulting key length would be 12 or more bytes.
inde on bintoc(numfield1)+bintoc(numfield2)
will surely be 8 bytes long, and be as quick as an index on integer.