Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/29/23 in all areas

  1. FPiette

    Set a default parameter for a function??

    You can specify default parameter values in a procedure or function heading. Default values are allowed only for typed const and value parameters. To provide a default value, end the parameter declaration with the = symbol followed by a constant expression that is assignment-compatible with the parameter's type. Parameters with default values must occur at the end of the parameter list. That is, all parameters following the first declared default value must also have default values. function GetWeekDates(const GivenDate: TDateTime; out startDate, endDate: TDateTime; const SOWDay: string = 'SU'): Boolean;
  2. David Heffernan

    Delphi 12 is available

    Yeah, pretty sure that's all that's needed. Can't believe nobody thought of that before.
  3. You may either measure the time for both way of doing it, of look at the assembly code generated.
  4. I always declare it inside the loop if it is not used outside. Declaring it outside may lead to hard to find bugs.
  5. dummzeuch

    Delphi 12 is available

    They do. As long as you haven't got an alternative development environment for the work you rely on, you will have to pay for Delphi or stay with an older version.
  6. FreeDelphiPascal

    Delphi 12 is available

    You are right, we are going through dark ages (I would also call them sad ages). So, when are we all going to sign a petition to Embarcadero and ask for a modern Delphi that does not crash every 10 minutes, it is not stuck in the 2000 and does not have the fart-smell of an 100 grandpa? We should all promise that we won't buy next version until they really really fix it. And we want a true road map. Embarcadero should understand that they don't own Delphi. They cannot do whatever they want and when they want. We are the customers. They cannot release 12 new tiny features and pretend it worth buying Delphi 12 just for that. I mean, come on! I would be ashamed to tell my users that in the next version they will be able to write text on two lines instead of one! This is not something even worth mentioning. Presenting this like a brand new shiny feature means "Hi Delphi guys, we full around last year, then we were busy to fix some bugs that were not supposed to be there, and improve the C++ which nobody uses anyway, so for you, we didn't have much time left, but at least we did this impressive feature that lets you split your string on two lines. PS: you have to pay for it. PSS: you have to pay also for the bug fixes!". Have you seen how fast are other languages advancing? Take a look at Julia! High level language BUT in some benchmarks it beats the craps out of grandpa Delphi. And its costs... nothing! Slap a nice IDE as VS Code on top of it, and you got a nice environment. Updates? Every few weeks. I am afraid to admit it, but I think I am (we all are) in love with what Delphi was in 95, when it was indeed cutting edge. Now we are all a bunch of gray beards and bold heads. No new blood to Delphi. I haven't heard of a single new startup company that uses Delphi. All the jobs around are offered by companies that started in 90-95 with pascal/delphi. All of them hove now 2 million lines of legacy code and a desperate need of Delphi developers. I know a few of them that never-ever take down the Delphi job position because it is never filled. Or if they find a good (and pretty old) programmer every 2-3 it is not enough to replenish the big number of old programmers that now are at the retiring age. For each new programmer they put their hands on, two retires. And as the "new" programmer is close to retiring age also, it only perpetuates the avalanche. Been there, seen that with my own eyes. I was the young one there, even though I am not that young anymore. You also see the lack of Delphi programmers when the job is announced as Delphi "slash" C++. They try to lure-in some C++ Builder programmers this way. Trick them into a Delphi position. I personally try to promote Delphi. But all my kids around me (nephews, friend's children, etc) are going with the cool wave. The old PHP is getting to be the new cool kid in the town now. Internet technologies. C#. I am not saying they are better. But they are definitively "cool". Embarcadero, with all its old guys there (good guys/programmers but not in touch with the new generation, with the new ways) and with its "get the money first - give the quality later" policy is not "cool". And cool is ******** important, because you don't lure in into the language old die-hard C or ASM gurus, you want to lure in kids. My kid is having more fun with Delphi than with Scratch. But I wouldn't put him on a Delphi-career path. Not with Delphi's featured being almost sealed. Embarcadero! The time to reverse the tide is running out! Delphi opportunity window is almost almost closed! I do see some efforts from Embarcadero (some blogs, some barely-voted youtube videos, some shy promotions), and in general Embarcadero is going into the right direction. But too slow. Waaay too slow. The biggest positive move was the Community Edition. I would have paid > 1000 euros to buy a license for my kid! (I still don't have words to say how dismayed I am that Emba didn't offer a free license until few years ago!!!!!!!!!!!!!!!!!!!!!!!!!!!) Wellllll..... In theory, I should shut up and relax, and fave fun with Delphi until my retiring age comes. I never ever had problems getting income with Delphi. But I love Delphi too much. It will be such a shame for Delphi to get retired the same day I retire! I do the same! I never use a new released feature in the first 3-4 years. I wait for it to get ripe and stable. 🙂Well, some things like "skins" (styles), 64 bit compiler, obviously took more than 3-4 years. FMX, still way to go... How many years ago they announced first time that Delphi has support for high DPI? Today, I can't still build decent high dpi apps in Delphi. I personally, won't buy a new license until I get a usable version to worth the price. It simply not fair to pay for bug fixes. My users will laugh at me if I would dare to ask money for a showstopper bug that was not supposed to be there. I always said (joking) that if Emba will release one-single-true-stable-version they will get out of business because everybody will buy that version (remember Delphi 7?) and lock into it. Nobody will upgrade to the next version for 8-12 years (unless the next version is as good as the other one). I am kinda doing that with 10.4.
  7. Hi all, I've always missed a modern implementation of a syntax highlighting in RAD Studio. So when I saw a github repo containing pascal grammar for Tree-sitter, I started working on an IDE extension that makes use of it. Since there are no Delphi bindings for Tree-sitter I wrote a simple TCP Server in Rust, which receives the currently opened source code, parses it and generates the highlight information. After this information is sent back to the IDE I use it to draw more informative highlighting. Simple example below. I'm not sure about the performance, since it sends the code, parses and sends back the entire ToolsApi.pas file with 83k lines in 421 milliseconds. But it doesn't need to reparse the entire file on changes so it should be able to provide real-time highlighting, although I haven't implemented that yet. Now the grammar isn't finished and I haven't really looked into how to write grammar files, plus I really don't know enough about the Pascal and Delphi language to undertake something like that. The Point of this post is to gauge if there is even any interest for an extension like this.
  8. Lajos Juhász

    Upgrading EurekaLog for Delphi 12

    you've to add the folder to the path.
  9. Just ran a quick test (I'm not sure if it is a very good test) : // Before loop var FileRec : TSearchRec; var Stopwatch := TStopwatch.StartNew; for var i := 1 to 100000000 do begin FileRec.Name := 'Test'; end; Log (Stopwatch.ElapsedMilliseconds); // logs 205 // Inside loop var Stopwatch := TStopwatch.StartNew; for var i := 1 to 100000000 do begin var FileRec : TSearchRec; FileRec.Name := 'Test'; end; Log (Stopwatch.ElapsedMilliseconds); // logs 3129 (more than 15x) But when changing the inline variable type to Integer declare before loop timings: 161 161 161 161 161 declare Inside loop timings: 161 160 160 161 160 Increasing loop to 100 million times: before 1624 inside 1617 for a loop of millions times this is really negligible difference, nothing at all. So declaring simple types inside a loop may be the better choice after all??
  10. EugeneK

    Crowdstrike antivirus killing Delphi

    It is challenging when you are in a big organization you need to work with IT team, Security team, get approval from management etc. and then repeat it for each new version. I wish Embarcadero worked with antivirus providers to whitelist it permanently.
  11. It doesn't matter what type of variable. The reason for this is the unnecessary repeated creation of the variable. We know that we only need to create it once.
  12. uligerhardt

    Set a default parameter for a function??

    If you don't want to change the order of parameters you can use two overloaded functions like this: interface function GetWeekDates(const GivenDate: TDateTime; const SOWDay: string; out startDate, endDate: TDateTime): Boolean; overload; function GetWeekDates(const GivenDate: TDateTime; out startDate, endDate: TDateTime): Boolean; overload; implementation function GetWeekDates(const GivenDate: TDateTime; const SOWDay: string; out startDate, endDate: TDateTime): Boolean; begin //... end; function GetWeekDates(const GivenDate: TDateTime; out startDate, endDate: TDateTime): Boolean; begin Result := GetWeekDates(GivenDate, 'SU', startDate, endDate); end; Alternatively, drop the overload and use different names like GetWeekDates and GetWeekDatesEx.
  13. Die Holländer

    Help to find database error

    delphibasics.co.uk
  14. Final solution: First I uninstalled via Windows. But this did not do the request to clear all registery data, so new installation was worse than the original situation. But when I run the (ISO) installation direct, I could tell the installer to clear everything during un-install. When the system was re-installing I could tell it to install the SDK and related stuff. Now everything finally seems complete.
  15. Ian Branch

    Konopka and Parnassus for Delphi 12?

    Yes, they are available.
  16. Nigel Thomas

    Konopka and Parnassus for Delphi 12?

    You should be able to check here: https://getitnow.embarcadero.com/ Edit to add: although unless the listing description mentions Delphi 12, I'm not sure it helps for determining if any particular component has been updated to support the latest.
  17. Uwe Raabe

    Pos, SplitString

    It could be even shorter: Result := MyStr.Remove(MyStr.IndexOf('<')).Trim; No need to check for existence as the internally called _UStrDelete already handles that case pretty well.
  18. Lars Fosdal

    Delphi 12 is available

    It has progressed to the Bronze Age...
  19. Remy Lebeau

    Pos, SplitString

    Minor nitpick - you should pass in StartPos as a 3rd parameter to the 2nd Pos() call: Delete(Result, StartPos, Pos('>', Result, StartPos+1) - StartPos + 1) You might also want to Trim/Right() the Result after deleting the characters.
  20. Sherlock

    Delphi 12 is available

    I can see them now, brooding in their offices over a not so satisfactory IDE release, when suddenly one of them jumps up in excitement, shouting: "I got it!" Proceeding to invite everyone to a Teams meeting to spread the good news. When they all finally got together an extensive presentation with countless slides was skillfully delivered to the increasingly agitated peers culminating in roaring applause and a virtual high five by Mr. Popov himself, who had joined after hearing the good news. With his chest swollen with pride he then announced "So this is it then: Athens!"
  21. They don't have the same approach : TMS Web Core generates the front as HTML/CSS/JS from the Pascal code. UniGUI and IntraWeb générale a server program with create a dynamic web site : each page (or cal) is done to the server. You need to host it on Windows (IntraWeb/UniGUI) or Linux (UniGUI). The three solutions allow to draw your client pages/forms in Delphi. (aka "the front end") UniGUI / IntraWeb manage the server part. (aka "the back end") If you want only server part, you have many Delphi project templates, components or libraries to work with, starting with WebBroker (included for all Delphi edition since many years). Other samples : RAD Server (Enterprise/Architect editions), Delphi MVC Framework (open source from Daniele Teri), MARS (open source from Andrea Magni), ...
  22. Bill Meyer

    IDE Syntax Highlighter using Tree-sitter

    I have not yet looked into the project, but there is this: https://github.com/rickard67/LSP-Pascal-Library and this: https://github.com/rickard67/language-server-protocol They were written, it seems, in support of a text editor by the same developer. He provides an unusually large amount of info with snippets demonstrating calls. Seems very helpful, but it also makes me think the task is challenging, even with what he has already written.
×