Newsgroups: comp.lang.c Path: utzoo!utgpu!watserv1!watdragon!dahlia!dsebbo From: dsebbo@dahlia.uwaterloo.ca (David Ebbo) Subject: Re: Help with casts Message-ID: <1991Feb25.143544.11950@watdragon.waterloo.edu> Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes) Organization: University of Waterloo References: <1991Feb21.040145.8678@cec1.wustl.edu> <409@ceco.ceco.com> <339@smds.UUCP> <414@ceco.ceco.com> Date: Mon, 25 Feb 1991 14:35:44 GMT Lines: 13 > 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