Jump to content

David Heffernan

Members
  • Content Count

    3477
  • Joined

  • Last visited

  • Days Won

    171

David Heffernan last won the day on April 9

David Heffernan had the most liked content!

Community Reputation

2300 Excellent

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. David Heffernan

    import C# Dll in delphi 10.4

    There are lots of different ways to do this depending on what the dll offers. Nobody can give you any steps without knowing how the dll exposes its functionality.
  2. Are you sure this is right? It takes a reference to the array rather than a copy.
  3. David Heffernan

    Delphi and "Use only memory safe languages"

    I mean I broadly agree. I was just trying to explain to Thomas what the post he was responding to actually said. For me it's crazy that dynamic arrays are zero based but strings are one based. Obviously I can see how we got here.
  4. David Heffernan

    Delphi and "Use only memory safe languages"

    This is a strange post. The issue with multiple languages is the mix of zero based and one based indexing.
  5. David Heffernan

    Delphi and "Use only memory safe languages"

    I don't disagree with that point. My point is that it was a bad idea in the first place to make strings 1 based.
  6. David Heffernan

    Delphi and "Use only memory safe languages"

    It would make far more sense for strings to be zero based. They are only one based because short strings stored their length in element 0.
  7. David Heffernan

    Delphi and "Use only memory safe languages"

    You can for short strings
  8. David Heffernan

    Delphi and "Use only memory safe languages"

    for var item in arr do This is generally to be preferred, but sometimes you want the index as well as the item. In Python we write for index, item in enumerate(arr): print(f"arr[{index}] = {item}") The absence of such a feature, which also relies on tuple unpacking, makes such loops in Delphi less convenient. This is pretty much the only reason for still using classic for loops.
  9. I use an EV code signing certificate
  10. No, this is not possible in Delphi 2007. You can declare typed constants for fixed length arrays, but not dynamic arrays.
  11. Sorry, content removed, I'm talking nonsense.
  12. Sorry, content remove, I'm talking nonsense
  13. David Heffernan

    Delphi and "Use only memory safe languages"

    Isn't the reason that Delphi is good at building GUI apps, at least it was for vcl back in the day. And it's still good for pure Win32 apps.
  14. David Heffernan

    Ping-pong between two Application.ProcessMessages

    Yeah, use threads
  15. David Heffernan

    How to edit a config file

    You need try/finally to avoid potential leaks. There are basically two main object creation patterns that you have to learn. You can't get far without them.
×