On 08/04/2011 08:10 AM, Sven Barth wrote:

The code that calculates the indices and handles other references could have side effects, so the compiler would not be able to optimize them. If you use this code once inside the "with"-clause you tell the compiler to do that calculation only once and that you are aware of possible side effects (or thus not occuring side effects).

OK, with C a possible compiler-generated the hidden pointer variable is as "non-volatile" as an explicit variable without a "volatile" spec would be, while in Pascal virtually everything is considered volatile. this in fact might ask for side-effects.

-Michael

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to