On Sun, Mar 6, 2011 at 4:16 PM, Mark Morgan Lloyd
<markmll.fpc-pas...@telemetry.co.uk> wrote:
> 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.

"...global variable which can be unintentionally written."
If the intention is not expose, intentionally, a variable... ok, this
is the better way I know (but it can be written without problem).


Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to