TY Sir , that's what I was guessing

nothing is perfect :
I did also hope that FPC did show compile time errors or warnings. I thought that "static" was for gobal variables and "class var" for encapsulated ones. As you see, it is not the case... found another "buglike" thing :
if you move the static var line declaration "after" the "Class var" line inside the body of the declared class , then the compiler raises errors... strange yup !
public
{ public declarations }
Class var RefCount: Integer;
EmuRomVer: Byte; static;
<<< error
public
{ public declarations }
EmuRomVer: Byte; static;
Class var RefCount: Integer;
<<< no error
maybe you need to do like :
public
{ public declarations }
Class var RefCount: Integer;
var
EmuRomVer: Byte; static;
and I didn't check it so far. assuming then that "Class var" is a declaration directive to begin a block (with no end ??)
anyway , all this isn't very pascalish , it is C.. ish then