Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this a bug in Seek()?
Message
From
26/03/2004 13:35:03
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00889986
Message ID:
00890051
Views:
23
Explain this BUG
CLEAR
Create CURSOR UPTest (Number I NOT null) && <== ALSO WITH I !!!
Index On Number Tag Number
Insert Into UPTest (Number) VALUES (1)
Insert Into UPTest (Number) VALUES (2)
Insert Into UPTest (Number) VALUES (3)
Insert Into UPTest (Number) VALUES (0)
Insert Into UPTest (Number) VALUES (7)

* this is a BUG on any search into a numeric index
* SEEK(),SEEK , INDEXSEEK(), KEYMATCH() also,
* all do a VAL() before start the search !!!
* A crazy for me

? Seek("Mary")     && .T. BECAUSE VAL("Mary") is 0
? Seek("1Mary")    && .T. BECAUSE VAL("Mary") is 1
? Seek("9Mary")    && .F. <=== because 9 is not present
 
? LOOKUP(Number,"Mary",Number),EOF()	&& this not use index

? Seek(.NULL.)		&& ERROR !!! bug 2 search a NULL into a index must return NULL or .F.

? Seek(DATE())		&& ERROR , OK

? Seek(.T.)    		&& ERROR , OK

? Seek($0)    		&& ERROR , !!! not conversion

USE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform