4 ms·
> - 2.2 Admittedly, not exactly solved, but classes are how we hide variable these days. You can use a const in a function and wrap it in {$J+} to allow modify
by Svip 8y ago
> - 2.2 Admittedly, not exactly solved, but classes are how we hide variable these days.
You can use a const in a function and wrap it in {$J+} to allow modifying consts. And that's a static variable on that function (or procedure), e.g.
{$J+}
procedure A; const C: integer = 0; begin Inc(C); Writeln(C); end;
{$J-}