Jump to content

Vandrovnik

Members
  • Content Count

    162
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Vandrovnik

  1. Vandrovnik

    FastReport 5 vs 6: PDF export

    They have changed bitmap exports, in my opinion it scales bitmap up when not necessary, which takes time and memory (and sometimes results in Out of memory). I had a discussion and tested export ot bitmap (height = 3508) with following results: - PrintOptimized=true, PictureDPI=300 --- Out of memory, TempBitmap.Height=10528 px - PrintOptimized=false, PictureDPI=300 --- works, TempBitmap.Height=3509 px - OLD_STYLE --- works, TempBitmap.Height=3508 px
  2. Vandrovnik

    Search for Usages not usable

    I have voted... And I am curious whether it will be fixed before the report is 5 years old 🙂
  3. Vandrovnik

    Search for Usages not usable

    I have not, because no result list was displayed, just cursor indicating that I should wait... After 3 minutes I killed it.
  4. Vandrovnik

    Search for Usages not usable

    I have just tried Search for Usages in 10.3.3 --> IDE frozen, Ctrl+Alt+Del 🙂
  5. In 10.3.3, it is better, usually rename finds all places, but sometimes it does not and finds for example just 10 of 30.
  6. Vandrovnik

    Converting project from Delphi 2006 to Delphi 10.2

    If you switch to DeviceCapabilities (which is DeviceCapabilitiesW), take care about memory allocation. 64 bytes is wrong, you will need 64 * SizeOf(Char).
  7. Vandrovnik

    Typed constants in Delphi.

    From my point of view, typed constants are just initialized variables, not true constants. (Even when I do not change their values in runtime.) When used in code, regular (untyped) constants may produce faster code: const XTyped : integer = 3; xUntyped = 3; var a: integer; begin a:=5*XTyped; if a>20 then exit; a:=5*XUntyped; if a>20 then exit;
  8. Vandrovnik

    Strange behavior for literals

    I have asked, what you think is a bug. You have answered and I wrote you, how compiler probably decides the value and that I do not see a bug there. When you want to decide, whether Delphi is wrong with something, first you need a specifiaction saying, what is right. Then you can compare actual result with it. And do testing with current version of Delphi, because even if you find an error in old version, it will probably never be fixed.
  9. Vandrovnik

    Strange behavior for literals

    When I compile in 10.3.3., I get this (even when optimization disabled):
  10. Vandrovnik

    Strange behavior for literals

    C : UInt64 = UInt32(-1) shl 63; I suppose it is calculated in unsigned 32 bits (because you used UInt32) as $FFFFFFFF shl 31 (63 is masked by width of the left side operand), which is $80000000. This number is expanded to unsigned 64bit, so $0000000080000000 is expected result. The same for L. Sorry, I do not see a bug here.
  11. Vandrovnik

    Strange behavior for literals

    I did not understand, which of the values of C, L, M in your example is buggy?
  12. Vandrovnik

    Strange behavior for literals

    Which of the examples above you think are bugs?
  13. Vandrovnik

    Strange behavior for literals

    Yes, they are. But David said "And have two literals with different values."
  14. Vandrovnik

    Strange behavior for literals

    You have: const F1 = 0.2; F2 = Single(0.2); writeln(F1); writeln(F2); 2.00000000000000E-0001 2.00000002980232E-0001
  15. Vandrovnik

    Strange behavior for literals

    If we use {$R+}, both generate an error.
  16. Vandrovnik

    Strange behavior for literals

    It is not consistent: Y: UInt32 = $123456789; // just a warning Z: Byte = 1000; // an error
  17. Vandrovnik

    Strange behavior for literals

    Delphi's "Shifting a 1 63 places to the left in a 32-bit variable" is the same as "Shifting a 1 31 places to the left in a 32-bit variable", so you will get $80000000. In the example above, shifting is done in 64bit variable and the result $8000000000000000 is assigned to 32bit typed constant - lower 32bits are used (0) and a warning is generated.
  18. Vandrovnik

    Strange behavior for literals

    Also note this in help: The operations x shl y and x shr y shift the value of x to the left or right by y bits, which (if x is an unsigned integer) is equivalent to multiplying or dividing x by 2^y; the result is of the same type as x. For example, if N stores the value 01101 (decimal 13), then N shl 1 returns 11010 (decimal 26). Note that the value of y is interpreted modulo the size of the type of x. Thus for example, if x is an integer, x shl 40 is interpreted as x shl 8 because an integer is 32 bits and 40 mod 32 is 8. So we have: const P: UInt32 = UInt32(1) shl 63; // contains 2147483648
  19. Vandrovnik

    Strange behavior for literals

    In help, they write: "If constantExpression is a real, its type is Extended." I believe F1 and F2 are both extended. const F1 = 0.2; F2 = Single(0.2); writeln(F1); writeln(F2); 2.00000000000000E-0001 2.00000002980232E-0001 If F1 was comp, it could save only integer values.
  20. But TDirectory.GetFiles (System.IOUtils) internally uses FindFirst/FindNext too...
  21. Vandrovnik

    Can Rio and Sydney co-exist?

    When I had 10.2 and 10.3 on my PC and uninstalled 10.2 later, help in 10.3 stop working and must be reinstalled.
  22. Have you tried to use lower resolution and turn the light on?
  23. I have seen the same problem and have "solved" it this way: Kamera.Quality := FMX.Media.TVideoCaptureQuality.LowQuality; Kamera.Quality := FMX.Media.TVideoCaptureQuality.MediumQuality;
  24. Vandrovnik

    Detect Windows shutdown?

    The declaration must be outside of the form...
  25. Vandrovnik

    Detect Windows shutdown?

    Did you read, what Cristian Peța linked? function ShutdownBlockReasonCreate(hWnd: HWND; Reason: LPCWSTR): Bool; stdcall; external user32; function ShutdownBlockReasonDestroy(hWnd: HWND): Bool; stdcall; external user32;
×