Help with casts

David Ebbo dsebbo at dahlia.uwaterloo.ca
Tue Feb 26 01:35:44 AEST 1991


>	Bear in mind that C is one of the hardest languages in the world to
>optimize.  For instance, in pascal the index of a for loop cannot be referenced
>outside of that loop, thus the code can be optimized by making that index a
>register variable. ... 
>
>Garry Garrett

No.  In Pascal, you can use any integer variable as a for loop index, and it
can be referenced outside the loop.
However, Ada behaves like you said.  The loop index does not have to be
explicitly declared.  It cannot be used outside the loop.

David Ebbo



More information about the Comp.lang.c mailing list