I'm using Delphi Berlin with default compiler options. I'm doing some bit routines and have a case that where inline changes the answer.
In Delphi, string <> '' seems to generate less code than Length(string) > 0.Comparing for empty string, defined in TMyClass.UpdateString(const strMyString : String):
In Delphi math.pas unit there is a procedure DivMod that i want to convert it into inline and optimize it for divisor to be always 10 . But I dont know details of Pentagon ASM . What is the conversion of bellow procedure
I manage a huge project in Delphi 2007. The target is to upgrade it to Delphi 10.1 Berlin this year. So in the meantime the source is compiled in both versions.
I need to migrate my C++ codes to Delphi. There are many checks to check if a given handle(HANDLE) is NULL or not in C++ codes. Then what is the equivalent constant that can be used in Delphi? It seems the null in Delphi is different from NULL in C++.
In Delphi, what is the equivalent of C++'s dynamic_cast, reinterpret_cast, and static_cast operators (especially when used on objects)?
I have this code (that runs under iOS with Delphi Tokyo):Normally the exception should be caught in the except end block, but in this case it is not caught by the handler and it is propagated to the Application.OnException handler.
I can define a byte using:and also can define with following:The compiler will pass for above two situation, but what is the difference of the byte and Byte?
Does Delphi support lower / upper type bounds for it's generics, e.g. such as those supported by Scala?
This Delphi code works when compiled for 32 bits, but gives an access violation when compiled for 64 bits. Is there a problem with the code, or is there a compiler bug?