-
Content Count
3493 -
Joined
-
Last visited
-
Days Won
172
Everything posted by David Heffernan
-
delphi 10.4.2 invalid compiler directive
David Heffernan replied to Manlio Laschena's topic in ICS - Internet Component Suite
Except this is troublesome if you have important project settings defined in the dproj file -
delphi 10.4.2 invalid compiler directive
David Heffernan replied to Manlio Laschena's topic in ICS - Internet Component Suite
We can't reproduce what you report. Looks like the issue might be in your project settings. Maybe. -
delphi 10.4.2 invalid compiler directive
David Heffernan replied to Manlio Laschena's topic in ICS - Internet Component Suite
And what about the rest of what I asked for? -
delphi 10.4.2 invalid compiler directive
David Heffernan replied to Manlio Laschena's topic in ICS - Internet Component Suite
If there's an error reported by the compiler, is possible for you to copy and paste that here? Is it possible that we can say the minimal code that reproduces the issue? At the moment you are asking us to give you directions but blind folding us. -
Have you considered learning Delphi yourself, or hiring a programmer with thee skills. Because ChatGPT plus this forum isn't going to work out.
-
Semicolon is the statement separator, and so is only needed if the next code is a statement It's also only by convention that you put the semicolon right next to the end. You could equally write: begin // foo end ; Same is true for the end of a unit. You can write it like this: end . If you omit the period at the end of a unit the compiler error says So, it's talking about the period which it considers a separate thing. So, in conclusion, there's only one end keyword. And semicolon is the statement separator, unrelated to end. And the period marks the end of a unit. Again unrelated to the end keyword.
-
Why does TRegistry.GetKeyInfo double the returned values of MaxSubKeyLen/MaxValueLen for far eastern locales?
David Heffernan posted a topic in RTL and Delphi Object Pascal
I came across this code in the RTL: function TRegistry.GetKeyInfo(var Value: TRegKeyInfo): Boolean; begin FillChar(Value, SizeOf(TRegKeyInfo), 0); Result := CheckResult(RegQueryInfoKey(CurrentKey, nil, nil, nil, @Value.NumSubKeys, @Value.MaxSubKeyLen, nil, @Value.NumValues, @Value.MaxValueLen, @Value.MaxDataLen, nil, @Value.FileTime)); if SysLocale.FarEast and (Win32Platform = VER_PLATFORM_WIN32_NT) then with Value do begin Inc(MaxSubKeyLen, MaxSubKeyLen); Inc(MaxValueLen, MaxValueLen); end; end; I'm wanting to call RegQueryInfoKey and wondering if I also need to mimic this far east if statement. I had a quick search on github for other code calling this function and can't see anything similar. Is it possible that this code is bogus? -
Why does TRegistry.GetKeyInfo double the returned values of MaxSubKeyLen/MaxValueLen for far eastern locales?
David Heffernan replied to David Heffernan's topic in RTL and Delphi Object Pascal
Thanks @Remy Lebeau -
That's all very nice. It's 2023 now though.
-
I'd say C++ is definitely not suited to this programming.
-
It was a marketing gimmick 15-20 years ago but it's meaningless now and not even used by MS. We still have no idea what sort of programming you are interested in, what libraries matter to you, and why the MS compiler as opposed to any others.
-
MFC was kinda gnarly. Macro hell. VCL was far superior. I don't think the visual moniker does much. Visual C#. What does that even mean. It's C#. I wouldn't say MS are pushing C# over C++. They each have their niches. You still haven't said what sort programming you are doing. It makes a huge difference to what language, tools and libraries you use. Often the target libraries are a more important considation than language. Why are you even interested in C++ anyway? And why the MS compiler rather than GCC or Clang?
-
This was a very long time ago, if your story is even true. Herb Sutter has been with MS since early 2000s. There's really not much to be gained by raking over the MS of yesteryear.
-
It's basically just another C++ compiler. But maybe what you are actually asking is abkut MSVC with thr Visual Studio IDE. And people's experiences probably differ hugely depending on what type of software they are developing.
-
FWIW this article seems relevant to the topic: New in RAD Studio 11: High DPI IDE and Form Designing! (embarcadero.com)
-
Problems with Delphi class structure / visibility
David Heffernan replied to Willicious's topic in Delphi IDE and APIs
To be fair, I think it's only when one has a comprehensive understanding can one take an informed critical view. I think there are plenty of design flaws with the language, but I don't think that they are holding you back yet. -
Problems with Delphi class structure / visibility
David Heffernan replied to Willicious's topic in Delphi IDE and APIs
It's possible to write poor code in any language. -
For me the choice is between linear search and dictionary. Unless there's a natural reason for the collection to be ordered.
-
It would also be better to write a function that took the string, and returned the method to be called, to be held in a variable of procedural type. You could then have a single call to the procedure where you passed the arguments. It's very repetitious to pass the same 4 arguments to 14 separate methods.
-
Why perform 7 comparisons, on average, when you can perform 14 every time?
-
I'm using madExcept and its call stacks are fine with optimisation on.
-
The if is better. But a better comparison would be a version that converted the string to an enum. That would be more readable in the long case statement.
-
set of object instances
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
I'm not talking about a Pascal or Delphi set. I'm talking about a set in general, non language or implementation terms. And that's that the question was about. Also there are a number of libraries that define set collections that aren't native Delphi set types. I'm thinking spring4d for example. -
Custom sort of a TList with object references (works in 32 bit, does not in 64 bit)
David Heffernan replied to Alexander Halser's topic in Algorithms, Data Structures and Class Design
Sertac's question on SO covers this topic: https://stackoverflow.com/questions/10162749/why-cannot-take-address-to-a-nested-local-function-in-64-bit-delphi -
set of object instances
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
What you've described is a set. So that's why he keeps thinking of it as a set.