Jump to content

David Heffernan

Members
  • Content Count

    3486
  • Joined

  • Last visited

  • Days Won

    171

Everything posted by David Heffernan

  1. David Heffernan

    What is this syntax?

    You tell me. What is the use here? You have not explained the intention.
  2. David Heffernan

    upcoming language enhancements?

    If they released when it was ready, and spent time fixing the broken windows immediately, then they would be able to develop more efficiently. By letting the defects endure, they just store up problems for the future. Technical debt. I don't find a comparison of modern vs historical delphi very instructive. Should be modern delphi vs its peers.
  3. David Heffernan

    What is this syntax?

    This is interop.
  4. David Heffernan

    What is this syntax?

    Explicit ordinal values tends to be used for interop with external libs. It's rarely useful for pure delphi code.
  5. Well, not really. Certainly in my experience when dealing with floating point data, you can just mandate that it doesn't have thousand separators. Perhaps if you are dealing with currency then you'd need to handle thousand separators but for other data it's not necessary.
  6. Try passing such a string to StrToFloat and see how it works out for you.
  7. So far as I am aware, routines for conversion from string to float do not accept strings with thousand seps so this is just not an issue.
  8. David Heffernan

    memory usage of TJPGImage

    Memory footprint. InstanceSize is just the instance and not the dynamically allocated data it owns.
  9. David Heffernan

    memory usage of TJPGImage

    If you are going to cache them, cache the jpeg stream rather than the decoded image. Then decode the image on demand with LoadFromStream.
  10. David Heffernan

    Google GMB via Delphi?

    Isn't it just a REST API? Like so many others? I don't understand why there would need to be anything delphi specific.
  11. That's probably not true. I think I dtoa accepts both, or if not then I modified it. Since I'm in control of the conversion code thats the right way.
  12. Yeah I don't do a heap allocation. I use a local fixed length array.
  13. I prefer to replace dot or comma with the locale's decimal sep and then use StrToFloat. Although in reality I don't use the Emba conversion functions because they are defective, i.e. not accurate.
  14. David Heffernan

    Bug with formatfloat in crossplatform ?

    It depends on the locale rather than the os
  15. David Heffernan

    Bug with formatfloat in crossplatform ?

    Looks like it. Submit a bug report.
  16. David Heffernan

    EurekaLog vs MadExcept vs manual

    Subtract $00401000 from the address and look it up in your detailed map file. But yeah, get madExcept or EurekaLog.
  17. David Heffernan

    How to get the actual UTC time??

    You are concentrating on the time zone, but that's not your issue at all. When you get time from somewhere, you will be able to convert to UTC because you will know the time zone associated with the time. Your problem seems to be that you want to use an authorative time source. You should do research on that rather than worrying about time zone conversion.
  18. David Heffernan

    How to get the actual UTC time??

    What source do you want to use for the time, given that you've ruled out the local computer?
  19. "I need to have XXX translated to YYY" seems a little abrupt to me.
  20. What pay rate are you offering?
  21. David Heffernan

    Floating point arithmetics

    Log the floating point control word and see if it is the same in the two programs.
  22. David Heffernan

    gridlines in listboxes

    Use a list view. Part of problem solving is exploring the problem space and finding the best solution, given the pros and cons of all possible options. Deciding on the solution first and then trying to force it to work is not the way to solve problems.
  23. Nothing fundamentally wrong with your option 1, so long as that is the single place where those string literals are written. The array does have the useful benefit of leading to helpful compiler error when enums extended, as discussed. But yeah, none of these options is especially terrible. I'd actually rate option 2 as the worst.
  24. What's your definition of magic string?
  25. Speed isn't the issue. The mistake that you make again and again. Maintainability is the only concern here.
×