identifier not found: Boolean8 lazarus / 21-General ---------------------------------------------------------------------- RDL · 2022-02-06 10:10 hello. Lazarus 2.2.0 (install via fpcupdeluxe) I create an empty project and get an error identifier not found: Boolean8 Does everyone have the same problem? PS. see attached gif ---------------------------------------------------------------------- ASerge · 2022-02-06 10:18 Quote from: RDL on February 06, 2022, 11:10:20 amLazarus 2.2.0 (install via fpcupdeluxe) Does everyone have the same problem? Lazarus 2.2.0 install via exe (windows). There is no such problem. After the open parenthesis, it gives a hint "Argument", not an error. ---------------------------------------------------------------------- RDL · 2022-02-06 10:23 @ASerge Thanks for checking. Can anyone check for Linux? If there is no error, how can I fix it? ---------------------------------------------------------------------- Thaddy · 2022-02-06 10:23 Also: https://www.freepascal.org/docs- html/current/ref/refsu4.html#x26-270003.1.1 There is no boolean8. But you can declare a type for it:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type Boolean8 = Boolean;The types are declared in system or even resolved by the compiler itself, so do not need any further units. The above type resolves your issue. Provided you declare it somewhere sensible. Platform does not matter. I saw it jumps into a type helper, - in syshelph.inc - will check that.[edit] The type helper is declared wrong. That is a bug. It should be removed, or the type should be aliased. See this table:Code: [Select]Name Size Ord(True) Boolean 1 1 Boolean16 2 1 Boolean32 4 1 Boolean64 8 1 ByteBool 1 Any nonzero value WordBool 2 Any nonzero value LongBool 4 Any nonzero value QWordBool 8 Any nonzero value ---------------------------------------------------------------------- PascalDragon · 2022-02-06 10:52 Quote from: RDL on February 06, 2022, 11:10:20 amhello. Lazarus 2.2.0 (install via fpcupdeluxe) I create an empty project and get an error identifier not found: Boolean8 Does everyone have the same problem? This is a known problem and is due to a commit that was forgotten to be merged 2.2 while it was prepared. 2.2.2 will have it fixed. In the meantime you can apply the changes from 947a183c to your Lazarus. Quote from: Thaddy on February 06, 2022, 11:23:22 amAlso: https://www.freepascal.org/docs- html/current/ref/refsu4.html#x26-270003.1.1 There is no boolean8. But you can declare a type for it:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type Boolean8 = Boolean;The types are declared in system or even resolved by the compiler itself, so do not need any further units. The above type resolves your issue. Provided you declare it somewhere sensible. Platform does not matter. I saw it jumps into a type helper, - in syshelph.inc - will check that.[edit] The type helper is declared wrong. That is a bug. It should be removed, or the type should be aliased. Boolean8 was introduced with 3.2.0, it's different from Boolean. The documentation wasn't updated, so that should be reported. ---------------------------------------------------------------------- RDL · 2022-02-06 11:24 @Thaddy @PascalDragon Thank you. I installed the trunk version and this error no longer appears. @PascalDragon May I know when lazarus 2.2.2 will be released? ---------------------------------------------------------------------- Thaddy · 2022-02-06 11:37 Reported. ---------------------------------------------------------------------- 440bx · 2022-02-06 11:49 Quote from: PascalDragon on February 06, 2022, 11:52:23 amBoolean8 was introduced with 3.2.0, it's different from Boolean. How is it different than boolean ? ---------------------------------------------------------------------- Thaddy · 2022-02-06 12:37 Quote from: 440bx on February 06, 2022, 12:49:02 pmQuote from: PascalDragon on February 06, 2022, 11:52:23 amBoolean8 was introduced with 3.2.0, it's different from Boolean. How is it different than boolean ? That's what I thought. It seems to be that Boolean8 strictly adheres to a one byte representation, whereas Boolean can pick and choose its best representation. ---------------------------------------------------------------------- 440bx · 2022-02-06 13:37 Quote from: Thaddy on February 06, 2022, 01:37:16 pmIt seems to be that Boolean8 strictly adheres to a one byte representation, whereas Boolean can pick and choose its best representation. My understanding is that boolean - as long as it is not in a bitpacked structure - is always one byte. Is it that boolean8 is not bitpack-able ? At this point, I'd really like PascalDragon to shed some light on what the difference, if any, between boolean and boolean8 is. ---------------------------------------------------------------------- trev · 2022-02-06 21:28 All I could find was: Quote [Boolean8 is an] FPC backwards incompatible change (targeted for 3.2.0 release) that's changing all "Boolean" type parameters to "Boolean8". ---------------------------------------------------------------------- marcov · 2022-02-06 21:33 Jonas replied to the bugreport: Quoteboolean8 is a Pascal-style boolean variable (can only hold only true = 1 and false = 0 values) that is always handled the same as a byte in terms of parameter passing conventions (as opposed to plain boolean, which follows the parameter passing convention for the C/C++ "bool" type). In practice, this currently only makes a difference for the x86-64 SYSV ABI, where bool/boolean is passed in the lower 8 bits of a register (rest of the bits are undefined), while boolean8 is zero-extended to 32 bits (like byte and other unsigned ordinal types < 32 bits). ---------------------------------------------------------------------- 440bx · 2022-02-06 21:45 Quote from: marcov on February 06, 2022, 10:33:06 pmJonas replied to the bugreport: Quote... where bool/boolean is passed in the lower 8 bits of a register (rest of the bits are undefined), while boolean8 is zero- extended to 32 bits (like byte and other unsigned ordinal types < 32 bits). The difference in extension could be important sometimes.  Good thing to know. Bottom line: they are very similar but, not quite the same. Thank you Trev and Marco. ---------------------------------------------------------------------- PascalDragon · 2022-02-07 12:27 Quote from: 440bx on February 06, 2022, 10:45:10 pmBottom line: they are very similar but, not quite the same. Correct. We had to introduce it due to the ABI differences mentioned by Jonas.