[fpc-pascal] readonly variables
alexionne at gmail.com
Sat Nov 28 15:35:34 CET 2009
You can use read function:
function Value: T; inline;
Result := DirectAccessToValue;
DirectAccessToValue := ...;
On Sat, Nov 28, 2009 at 13:55, Markus Glugla <fpc at xgelb.de> wrote:
> is it possible to set a variable in a programm as a readonly variable?
> I would set a variable at a position in the runing programm. Since this
> time the variable should be readonly. The next set of the variable
> should produce an error.
> In bash programming you found a command "readonly" making this effect.
> Is there a command for FreePascal?
> program readonly;
> v:=1; // At this position it should be readonly.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
Aleksa Todorovic - Lead Programmer
More information about the fpc-pascal