Problem passing byte as a parameter lazarus / 21-General ---------------------------------------------------------------------- Neville · 2022-11-23 15:47 A function test(x:byte;q:setofbyte):boolean;   screws up in that on examining the parameters after a call, x does not contain the number provided from the calling code. In the project I'm writing, I have solved the problem  by redefining the function: test(x:word;q:setofbyte):boolean;  I HAVE NOT BEEN ABLE TO REPRODUCE THE PROBLEM in a bit of simple code. Has anyone else suffered the same problem, or have any other comments to make? Thanks, Neville ---------------------------------------------------------------------- Thaddy · 2022-11-23 15:56 fpc version, os version, bitness etc. There seems nothing wrong with your code, but we see no code, just a declaration. Maybe as easy as override. ---------------------------------------------------------------------- MarkMLl · 2022-11-23 20:20 Quote from: Neville on November 23, 2022, 04:47:03 pmHas anyone else suffered the same problem, or have any other comments to make? Actual error message or expected and actual numbers from the debugger? As best I know, "screws up" does not appear anywhere in the compiler. Remember: "When a programmer has a hard time finding a bug, it's because he's looking in the wrong place". MarkMLl