I'm trying to build the above project, and I've made some progress (it wasn't finding JcfMiscFunctions), but now it's failing within the unit SortUsesData:
function LengthNameSort(Item1, Item2: Pointer): integer;
...
Result := Sign(Length(lcItem1.SortKey) - Length(lcItem2.SortKey));
It would seem that it can't find Sign. I don't remember that as a builtin function, nor do I see it defined in any source.
Any suggestions?
Thanks for your help!
Richard Rogers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I won't cut and paste it, but you can make a workalike easily. Sign is a common mathematical function that takes a number and returns an integer of either -1, 0, or +1, ei with the same sign as it's argument
When given a positive integer, it returns 1,
when given a negative integer, it returns -1,
when given zero it returns zero.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm trying to build the above project, and I've made some progress (it wasn't finding JcfMiscFunctions), but now it's failing within the unit SortUsesData:
function LengthNameSort(Item1, Item2: Pointer): integer;
...
Result := Sign(Length(lcItem1.SortKey) - Length(lcItem2.SortKey));
It would seem that it can't find Sign. I don't remember that as a builtin function, nor do I see it defined in any source.
Any suggestions?
Thanks for your help!
Richard Rogers
In Delphi 7, Sign() is defined in Math.pas.
I won't cut and paste it, but you can make a workalike easily. Sign is a common mathematical function that takes a number and returns an integer of either -1, 0, or +1, ei with the same sign as it's argument
When given a positive integer, it returns 1,
when given a negative integer, it returns -1,
when given zero it returns zero.
If you get it to work, can you post the new code back as a patch? Ideally the changes for Delphi 5 would be covered by a $IFDEF