The case for strict parameter types

While refactoring a bit the way some “special” functions were handled in DWScript, I came about a case where the compiler started accepting strings as Math functions parameters.

While this comes naturally as an “interesting” side-effects of automatic typecasts, it left a feeling of “wrongness”, accepting literal code like Abs(“foo”) and then failing at run-time is asking for trouble.

(more…)

Beware of TForm.SetBounds in a multi-monitor context

When in a multi-monitor context with monitors having varying DPI settings, TForm.SetBounds can be a little ambiguous when combined with form scaling.

The issue comes from Width / Height, in Delphi 10.3.1, they are understood as applying to the monitor the form is currently one, not the monitor SetBounds could be moving the form to. This is manifest when restoring a form position: if you store a form’s bounds, then try to restore it with SetBounds, it will result in an incorrectly sized form.

(more…)

Prepping up for GPDR

As you have probably been made aware by the flurry of privacy policy updates in your mailbox, GPDR is coming.

While I am not convinced GDPR will not turn into a perfect showcase for “the road to hell is paved with good intentions”, this is also a good opportunity to update BeginEnd.net to use the 64bit version of DWScript and add a few missing features.
(more…)