Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!ucbvax!hplabs!hpda!hpcupt1!hpisod2!decot From: decot@hpisod2.HP.COM (Dave Decot) Newsgroups: comp.lang.c Subject: Re: Re: A question of stylecode! Message-ID: <2550115@hpisod2.HP.COM> Date: 15 Dec 89 01:15:45 GMT References: <165@norsat.UUCP> Organization: Hewlett Packard, Cupertino Lines: 24 > I always thought that an interesting use for the comma was in a for > loop when one wanted, say, to create the identity matrix: I agree completely. However the following code: > float array[SIZE][SIZE]; > int i,j; > > /* initialize the whole thing to zero, then to this: */ > for(i=0,j=0; i array[i][j] = 0; creates the following matrix: 0 garbage garbage garbage ... garbage garbage 0 garbage garbage ... garbage garbage garbage 0 garbage ... garbage . . . . ... . : : : : ::: . garbage garbage garbage garbage ... 0 ...which is not precisely what I wanted. Dave Decot