[next] [prev] [prev-tail] [tail] [up]

#### 1.2.42 $J or $WRITEABLECONST : Allow assignments to typed consts

This boolean switch tells the compiler whether or not assignments to typed constants are allowed. The default is to allow assignments to typed constants.

The following statement will switch off assignments to typed constants:

{$WRITEABLECONST OFF}

After this switch, the following statement will no longer compile:

Const
MyString : String = ’Some nice string’;
begin
MyString:=’Some Other string’;
end.

But an initialized variable will still compile:

Var
MyString : String = ’Some nice string’;
begin
MyString:=’Some Other string’;
end.

[next] [prev] [prev-tail] [front] [up]