view run/foreach_04.d @ 1:3414705c41ac

removed CVS header
author thomask
date Sun, 26 Sep 2004 12:06:09 +0000
parents 3269e4627918
children f87ba6507260
line wrap: on
line source


int main(){
	int array[3];
	array[0]=0;
	array[1]=2;
	array[2]=4;
	int count=0;
	assert(count==0);
	foreach(int index, int value; array){
		assert(index*2==value);
		count++;
	}
	assert(count==3);
	return 0;
}