-
Content Count
3710 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
StrToFloat () all combinations of decimal separator and lang. settings
David Heffernan replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
Yeah I don't do a heap allocation. I use a local fixed length array. -
StrToFloat () all combinations of decimal separator and lang. settings
David Heffernan replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
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. -
It depends on the locale rather than the os
-
Looks like it. Submit a bug report.
-
EurekaLog vs MadExcept vs manual
David Heffernan replied to Tom F's topic in RTL and Delphi Object Pascal
Subtract $00401000 from the address and look it up in your detailed map file. But yeah, get madExcept or EurekaLog. -
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.
-
What source do you want to use for the time, given that you've ruled out the local computer?
-
Can somebody help me to translate a short Delphi console app to C++ Builder?
David Heffernan replied to TurboMagic's topic in General Help
"I need to have XXX translated to YYY" seems a little abrupt to me. -
Can somebody help me to translate a short Delphi console app to C++ Builder?
David Heffernan replied to TurboMagic's topic in General Help
What pay rate are you offering? -
Log the floating point control word and see if it is the same in the two programs.
-
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.
-
Refactoring Enum to string using enum helpers
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
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. -
Refactoring Enum to string using enum helpers
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
What's your definition of magic string? -
Refactoring Enum to string using enum helpers
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Speed isn't the issue. The mistake that you make again and again. Maintainability is the only concern here. -
Const Records and Class/Property Attributes (decoration)
David Heffernan replied to mvanrijnen's topic in Algorithms, Data Structures and Class Design
So, the answer is a definitive no. Yeah, you are right, I just assumed that typed constants would be placed in read only memory, as they are in other tool chains. Oh well. -
Const Records and Class/Property Attributes (decoration)
David Heffernan replied to mvanrijnen's topic in Algorithms, Data Structures and Class Design
Aren't they placed in read only memory? -
Const Records and Class/Property Attributes (decoration)
David Heffernan replied to mvanrijnen's topic in Algorithms, Data Structures and Class Design
Attribute syntax demands true constants -
Convert Double to Real
David Heffernan replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
Given this definition type Real = Double; I'd say you don't have much to fear. Of course, this code doesn't compile. -
Why do this in a thread? Seems like much complexity for no possible gain.
-
It's not going to be sent many messages. Can you reproduce the behaviour in a cut down program?
-
Get rectangle of the button that was pushed on another form...
David Heffernan replied to RTollison's topic in General Help
The setup is pretty opaque for us here. These are the sort of details that matter. Without them it's just guesswork. -
Get rectangle of the button that was pushed on another form...
David Heffernan replied to RTollison's topic in General Help
Make a note of the coordinates in the code that handles the button click event, and pass that on to other other code. I'm assuming that you are in control of all of the code. -
Alfabetical order of a letter
David Heffernan replied to Henry Olive's topic in RTL and Delphi Object Pascal
You should check that Length(Str)=1. This fails of course, it doesn't compile. But it's not the code that was suggested. You should take more care when copying code. -
Alfabetical order of a letter
David Heffernan replied to Henry Olive's topic in RTL and Delphi Object Pascal
Wbat if there are more than 26 columns? -
Can I force compiler to report on enum change that related code needs changing?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Seems like you should be building the GUI in code rather than the designer.