[fpc-pascal] Illeagal assignment to For Loop variable in Free pascal

Sven Barth pascaldragon at googlemail.com
Tue Jun 17 14:31:01 CEST 2014


Am 17.06.2014 13:17 schrieb "Jonas Maebe" <jonas.maebe at elis.ugent.be>:
>
>
> On 17 Jun 2014, at 13:05, mokashe.ram wrote:
>
>> Could Any one help me for fixing below error in free pascal. as i am
tring
>> to excute for loop in decemental order using 'DOWNTO' but its thwoing
error
>> 'Illeagal assignment to For Loop variable 'Counter' as this is possible
in
>> TP but in Free pascal its not working so is there any workaround for
this?
>
>
> You should probably compile the code with -Mtp to switch FPC into
(mostly) TP-compatible mode. There are more differences between TP and FPC
that you'll encounter otherwise.

As an alternative to the command line option -Mtp you can also add {$mode
tp} at the top of the source file (before the uses-clause at least).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140617/9e2372c6/attachment.html>


More information about the fpc-pascal mailing list