Am 02.07.2017 um 20:12 schrieb Martok: >> They are: >> http://docwiki.embarcadero.com/Libraries/XE5/en/System.Boolean > That prototype is a recent invention, it wasn't there in older versions. Also
*sigh* This is the case since pascal was iso standarized. > the text sounds quite different somewhere else: > http://docwiki.embarcadero.com/RADStudio/XE5/en/Simple_Types#Boolean_Types > >> Yes. What I wanted to point out: also delphi does optimizations on enums >> which fails if one feeds >> invalid values. > Okay, if you want believe that Booleans are enums: I do not believe, I know. > > b:=boolean(42); > if not b then > writeln('falsy') > else > writeln('truthy'); > > Prints truthy. Doesn't crash. Yes, undefined behavior. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel