[fpc-pascal] Re: Read-only global references

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sun Mar 6 20:16:12 CET 2011


leledumbo wrote:
> Using functions is the only way I know (still it's not that "read only",
> accessing from assembly code still allows modification). For pointer based
> types, you could give a copy of the instance instead of the original one (if
> you want a better read only semantics where the function has persistent
> return value).

Thanks, I'd reluctantly come to the same conclusion. "Read only" in that 
it doesn't expose a global variable which can be unintentionally written.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list