Path: utzoo!utgpu!jarvis.csri.toronto.edu!torsqnt!tmsoft!masnet!canremote!decot@hpisod2.hp.com From: decot@hpisod2.hp.com@canremote.uucp (decot@hpisod2.HP.COM) Newsgroups: comp.lang.c Subject: Re: Re: A question of style Message-ID: <89122504120598@masnet.uucp> Date: 21 Dec 89 05:03:00 GMT Organization: Canada Remote Systems Limited, Mississauga, ON, Canada Lines: 32 From: decot@hpisod2.HP.COM (Dave Decot) Subj: Re: A question of stylecode! Orga: Hewlett Packard, Cupertino > 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 --- * Via MaSNet/HST96/HST144/V32 - UN C Language * Via Usenet Newsgroup comp.lang.c