The Delphi 8 compiler introduces the FINITEFLOAT directive.
Remarks
The $FINITEFLOAT directive controls the raising of exceptions and the results of floating point calculations when over/underflow occurs.
In the {$FINITEFLOAT OFF} state, floating point calculations return NaN, -INF or +INF.
In the {$FINITEFLOAT ON} state, which is the default, floating point calculations causes the compiler to emit extra code to check the results of the floating point calculations, and when the range checks fail, causes an exception to occur. These extra checks take time, so, to provide a performance boost, consider using {$FINITEFLOAT OFF}.
Quiz
In reference to the following program, consider separately, what happens in each case if
{$APPTYPE CONSOLE}uses SysUtils;var x, y, z: Double;begin try x := 1; y := 0; z := x / y; WriteLn(z); except on E: Exception do WriteLn(E.Message); end;end.
In 2017, with the release of Delphi 10.2 Tokyo, Embarcadero introduced a specialized implementation of the Observer pattern into the System.Classes unit. While it has been in the wild for 9 years, it remains a "hidden" architecture for many, primarily because it serves as the invisible engine behind LiveBindings. Other than live bindings, you can also use the Observer pattern as a way to update component settings to the Windows registry, an .ini file, or persist it elsewhere.
System.Classes