Menu

Problem building jcfGui.dpr in Delphi 5

Developers
2005-12-21
2013-05-23
  • Richard Rogers

    Richard Rogers - 2005-12-21

    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

     
    • Anthony Steele

      Anthony Steele - 2005-12-21

      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.

       
    • Anthony Steele

      Anthony Steele - 2005-12-22

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.