[fpc-pascal]adding zero

Peter Vreman peter at freepascal.org
Fri Jan 3 23:54:49 CET 2003

> In certain cases I find it useful for documenting my code to show "+0"
> when indexing an array...e.g.
> x := a [m*n + 0];
> Is the compiler smart enough to ignore my "+0"? .... or do I incur a
> slight performance penalty for including it?

The compiler does not remove the +0.

Btw. You can test it yourself by using the -al switch. It'll give you the
assembler output and includes also the corresponding source lines.

More information about the fpc-pascal mailing list