luis wrote:for example if you have a LONG field containing two distinct WORDS having separate meanings.
With the current version, you can sort by one of the words just by calculating the offset and using the #PB_Word flag.
I'm not sure if that's a good idea. In a case like that, it would probably be much clearer and less error prone if the structure would actually contain two distinct WORD fields ("StructureUnion" can also be used if wanted).
luis wrote:I admit it's not something you do every day
I never did it during the last 20 years, and I'll probably not do it during the next 50 years.
luis wrote:the macro can give you 100% of the functionality you requested.
Of course it would be much more elegant, if this would be built directly into the respective sorting procedures.
E.g. now we have this in PB:
Position = FindString(String$, SuchString$ [, StartPosition [, Modus]])
Not long ago in an earlier PB version, the parameter
StartPosition was not optional, and people made a request for that. This functionality could also very well be achieved by using a macro, but nevertheless in a subsequent PB version it has been built directly into the
FindString() function ...