Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: BINTOC with F flag use a fixed S
Message
From
25/09/2005 06:42:33
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: BINTOC with F flag use a fixed S
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01052822
Message ID:
01052822
Views:
53
Observed:
BINTOC(somenumber,"F") is BINTOC(somenumber,"FS")
CLEAR

? 0h+BINTOC(1.0,"F")
? 0h+BINTOC(1.0,"FS")
Result, "F" is unusable in index
otherwise from how much writing in the documentation:


When using BINTOC( ) for an 8 byte index creation, you should use 8 and not "B". For 4 byte results, you should use 4 if nExpression is an integer type. Otherwise, you should use 'F' for floating point type.


Repro:
CREATE CURSOR TESTX (FREAL B)
INSERT INTO TESTX VALUES (1)
INSERT INTO TESTX VALUES (2)

INSERT INTO TESTX VALUES (-1)
INSERT INTO TESTX VALUES (-2)

* INTERPRETER FREAL like a Real floating point
INDEX ON BINTOC(FREAL,"F") TAG TREAL
BROWSE NORMAL TITLE "WRONG ORDER"

INDEX ON BINTOC(FREAL,"F") TAG TREAL DESCENDING
BROWSE NORMAL TITLE "WRONG ORDER"

USE
RETURN
Reply
Map
View

Click here to load this message in the networking platform