[fpc-pascal] Weird string behavior

Santiago A. svaa at ciberpiula.net
Tue Jul 26 16:41:50 CEST 2016


El 26/07/2016 a las 16:19, Michael Van Canneyt escribió:
>
>
> On Tue, 26 Jul 2016, Santiago A. wrote:
>
>> El 26/07/2016 a las 12:27, Mattias Gaertner escribió:
>>> a3:=a1+a2 => cp = 1252
>>> a3:=a2+a1 => cp = 65001
>> Is that the expected behavior?
>>
>> IMHO the result should be the same. And the only way is to make it
>> depend on a3, no matter what is in the left side. That's the way things
>> are done in Pascal
>
> This is not correct. In pascal the right-hand side of an assignment
> has a well-defined type. The compiler checks whether the type on the
> right is assignment-compatible to the left side.
Sorry I meant no matter what is in the right side. Other way my statment
has no sense ;-)
>
> Michael.
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


-- 
Saludos

Santi
svaa at ciberpiula.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160726/564d676d/attachment.html>


More information about the fpc-pascal mailing list