-
Content Count
3711 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
Find exception location from MAP file?
David Heffernan replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
madExcept, EurekaLog, etc. are the best ways to do this. But obviously you don't have that yet, so you can just subtract $00401000 from the address and look up that value in the Publics by Value section of the map file. -
Congrats to both of you
-
Good quality Random number generator implementation
David Heffernan replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
I don't get this. If you don't have any particular needs, then I don't see how anybody can offer suggestions. And if all you want is a list of libraries, then websearch will get you that. Do you know what you are going to do with these random numbers? -
Good quality Random number generator implementation
David Heffernan replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
What properties are you looking for. The reason that there are many different algorithms in use is that different applications have different requirements. -
When you buy ebooks you are granted rights to read the book, not to send to others.
-
Not all free. Pretty galling for any of the authors of these books to read this post.
-
It depends entirely on what you want to learn about.
-
How to "correctly" pass an array to a C function
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
Your way makes it impossible to pass an empty array. If an empty array is never valid, then fine. If an empty array is supported then the Pointer cast is preferable. -
How to "correctly" pass an array to a C function
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
The reason I prefer Pointer(data) is that it doesn't trigger range check error if the array has length 0. -
Start goes with finish, begin goes with end for nouns at least. For verbs start and stop are pairs.
-
Yeah, this is much better. And a good matching pair too.
-
How to "correctly" pass an array to a C function
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
You need to specify the calling convention, probably cdecl. And I'd declare it as PInteger and pass Pointer(data). -
I think start should pair with finish, begin pairs with end, from pairs with to, etc. Don't really like start paired with end.
-
ofc, the naming of TrimRight is a bit of a slap in the face for Arabic speakers and other RTL languages!!! Should really be TrimEnd and TrimBeginning or something like that...
-
TrimRight is what you want
-
Why Record pointer is not allowed as function parameter and return?
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
Yes. You have to declare a pointer type. -
Bug in Android32 compiler
David Heffernan replied to Alexander Sviridenkov's topic in RTL and Delphi Object Pascal
All I am saying is that you don't need to special case INFs for comparison. -
Bug in Android32 compiler
David Heffernan replied to Alexander Sviridenkov's topic in RTL and Delphi Object Pascal
You don't need to do anything with INFs, they compare exactly as you'd expect. -
Bug in Android32 compiler
David Heffernan replied to Alexander Sviridenkov's topic in RTL and Delphi Object Pascal
Not a bug. All comparison operators return false when one of the arguments is NaN. https://stackoverflow.com/questions/1565164/what-is-the-rationale-for-all-comparisons-returning-false-for-ieee754-nan-values Also, bug reports are best at Quality Portal. Although not this one, because it's not a bug. -
64bit Debugger Not Handling Memory Problems
David Heffernan replied to CB2021's topic in General Help
That's exactly the error I'd expect and the debugger will break at the line of code that accesses the uninitialized pointer. None of these tools will make much difference to this sort of debugging. You just need a slightly better understanding of how memory errors manifest and how to let the debugger tell you what's wrong. -
Well, how are you printing at the moment, if not using GDI? And GDI printing must be like 30 years old now.
-
Is a "bare-minimum" EurekaLog possible?
David Heffernan replied to aehimself's topic in Delphi Third-Party
Yes, this is precisely what I currently do -
Is a "bare-minimum" EurekaLog possible?
David Heffernan replied to aehimself's topic in Delphi Third-Party
Encrypting the map file, and then decrypting on runtime doesn't add much security. Your map file would be readily reversible by any moderately skilled hacker. If you want to keep the map file private, don't add it to your exe and decode the stack trace addresses into method names when the bug report is sent to you. -
Answer can be found in the documentation of Sleep. Sleep can only wait for multiples of system ticks. And your system appears to tick at a frequency of 15ms. Which is typical, that being the default tick frequency. There are many many discussions of this online. Here's one: https://stackoverflow.com/questions/3744032/why-are-net-timers-limited-to-15-ms-resolution
-
Is a "bare-minimum" EurekaLog possible?
David Heffernan replied to aehimself's topic in Delphi Third-Party
Yes, I understand the behaviour, but I just don't know the use case. I guess it just be some exception handling model that I've never used. Like Mathias I tend to raise a new exception, or re-raise. But obviously breaking language feature is not desirable.