× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
An index orders its entries based on the byte value of the key section of the 
index entry.

No provision ( that I know of ) is made for descending keys.  Also, signed keys 
can be a bit suprising, as a BIN(2) fld that has the value of -1 is ordered 
after all positive values ( X'FFFF' is byte wise greater than X'0001' ).

Here is a technique I have come up with for handling descending keys: Use the 
NEG instruction to negate the value of the key fld before writing it to the 
index.  To chain to an index with a descending key, NEG the key before using 
the FNDINXEN instruction.

To order signed keys, preceed the bytes of the key with a single "sign" 
character. Positive key values set the sign char to a "P", negative values set 
the sign to "N". This way the negative key value will always sort before a 
positive value.

Steve Richter



--



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.