-
Content Count
407 -
Joined
-
Last visited
-
Days Won
8
Everything posted by Kryvich
-
An external MM can help catch double free errors. Try FastMM4 by Pierre le Riche. Declared support for Delphi 4 (or later)
-
Getting up to speed with TRestClient and the other components
Kryvich replied to RCrandall's topic in Network, Cloud and Web
@RCrandall You can put some likes for his answers in this thread, and thus increase his already high reputation on Delphi Praxis. 😉 -
You are late. Somebody already posted this position here.
-
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
I wrote about PAS2JS developers. PAS2JS is a subproject of FPC, written mostly in the same style. -
how can I use FastReport in Delphi community edition?
Kryvich replied to GreatDayDan's topic in Tips / Blogs / Tutorials / Videos
AFAIK, no free edition for CE. And you couldn't use the old Delphi CE 10.3 with the free FR because the registration keys for Delphi CE 10.3 have expired. -
Getting up to speed with TRestClient and the other components
Kryvich replied to RCrandall's topic in Network, Cloud and Web
There are several free and opensource REST libraries available so you don't have to start from scratch. I would recommend DMVCFramework -- a popular and powerful framework for web solution in Delphi. Supports RESTful and JSON-RPC APIs development. WiRL -- RESTful Library for Delphi. mORMot -- Synopse mORMot ORM/SOA/MVC framework See example applications to a specific framework. -
how can I use FastReport in Delphi community edition?
Kryvich replied to GreatDayDan's topic in Tips / Blogs / Tutorials / Videos
In 2018, a special edition of Fast Report was included in the package with the Delphi Community. Now you need to buy Fast Report yourself, or buy the Delphi Professional with Fast Report Embarcadero RAD Edition included. -
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
Definitely it would look better and not generate tons of compiler warnings in Delphi. They grab this practice from FPC. See pasresolver.pp, there are procedures like RaiseMsg, RaiseNotYetImplemented, RaiseInternalError, RaiseInvalidScopeForElement. All of them can be replaced with custom exceptions. -
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
I tried the TestInitialization project with Pascal Analyzer Lite, but it doesn't see a problem with using an uninitialized var parameter either. Perhaps the full paid version will determine this issue. -
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
I try to never allow hints or warnings in the release code. Right now I am adapting the latest version of the PAS2JS transpiler for Delphi. I see dozens of warnings that Delphi shows. Most of them are false positive, such as an undefined function return value (W1035) after an exception is generated (RaiseInternalError(...);). But some potentially problematic places went unnoticed by the PAS2JS developers. Also, a lot of warnings are generated due to the different internal representation of strings in Free Pascal (UTF8) and Delphi (Unicodestring). I carefully study all warnings and correct the code. -
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
The compiler should generate absolutely the same code for var and out parameters, both for the calling and for the called subroutines. The only difference will be in the warnings it issues: Warning var parameter out parameter Where to show 1. W1036 Variable might not have been initialized yes no Calling routine 2. The parameter must be initialized before use no yes Called routine 3. Return value of parameter might be undefined no yes Called routine Warnings 2. and 3. should work in the same way as for the Return value of a function (W1035 Return value of function might be undefined). That is, all the necessary checks (W1035, W1036) are already in the compiler, Embarcadero only has to apply them to the parameters where necessary. -
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
Checking the initialization of var parameters before use is a basic thing that does not require deep analysis. In fact, it has already implemented for parameters passed by value. procedure Test; procedure DoStuff({var} a: Integer); begin if a = 0 then a := 1; end; var a: Integer; begin DoStuff(a); // W1036 Variable 'a' might not have been initialized Writeln(a); end; -
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
Good article. The main point against using the out parameter in Delphi is sub-optimal generated code, due to the need to maintain compatibility with C++ Builder. But how often is Delphi code used in C++? Maybe a better solution would be to add additional checks and parameter initializations to the calling C++ code? -
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
The FPC compiler shows a hint like this in this case: Hint: Local variable "a" does not seem to be initialized But I'm sure this should be a warning, not a hint. -
Using uninitialized object works on Win32, throws AV on Win64
Kryvich replied to aehimself's topic in General Help
I created a minimal reproducible example for this case. program TestInitialization; {$APPTYPE CONSOLE} procedure Test; procedure DoStuff(var a: Integer); begin if a = 0 then a := 1; end; var a: Integer; begin DoStuff(a); Writeln(a); end; begin Test; Readln; end. It's strange that the compiler doesn't show a warning W1036 Variable 'a' might not have been initialized. This is definitely an oversight. -
What is the working language for communications in your company? English, Russian?
- 9 replies
-
- remote job opportunity
- delphi developer
-
(and 1 more)
Tagged with:
-
ANN: HelpNDoc 7.9 is available: Mass update pictures' properties, new font selector with search capabilities, UI refinements and more...
Kryvich replied to HelpNDoc's topic in Delphi Third-Party
I see that HelpNDoc can generate various types of help files, including HTML and CHM. Can the generated files be used as context help in Delphi programs via TControl.HelpKeyword and/or TControl.HelpContext?- 2 replies
-
- documentation
- help authoring tools
-
(and 1 more)
Tagged with:
-
Waiting for the IDE update is not a best strategy. If you plan to update your development environment, you should prepare your code for the High DPI.
-
Which implementation of this is easier to understand?
Kryvich replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
The code can be further simplified: if Utc.IsZero then Continue; _UtcValid := Utc; ... -
High DPI is a big step forward in Windows development. Like the transition to Unicode, it may require a careful study of the codebase, fixing custom rendering of forms, updating third party components. This will not be automatically fixed with a new patch of IDE.
-
D11 - Form changes size when I compile/build. :-(
Kryvich replied to Ian Branch's topic in Delphi IDE and APIs
Try temporarily turn off Display Scaling in Windows. -
How to set which of two class constructors executes first?
Kryvich replied to Incus J's topic in RTL and Delphi Object Pascal
Add using unitA from unitB? -
is the third argument optional?
-
upcoming language enhancements?
Kryvich replied to David Schwartz's topic in RTL and Delphi Object Pascal
I don't expect much from the new version, but a properly implemented iif statement would improve my code here and now. -
Not only. How about CrossVCL? They support Linux and OSX, and plan to support Android and iOS in 2021.