Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!ames!elroy!ucla-cs!rutgers!att!pacbell!varian!zehntel!donw From: donw@zehntel.zehntel.com (Don White) Newsgroups: comp.sys.amiga Subject: Re: Struggling through the "C" Message-ID: <815@zehntel.UUCP> Date: 15 Apr 89 00:47:08 GMT References: <12000@louie.udel.EDU> <522@lzaz.ATT.COM> Sender: usenet@zehntel.UUCP Reply-To: donw@zehntel.UUCP (Don White) Organization: Zehntel, Inc. Walnut Creek, CA Lines: 20 In article <522@lzaz.ATT.COM> hcj@lzaz.ATT.COM (HC Johnson) writes: >In article <12000@louie.udel.EDU>, LIZAK98%SNYBUFVA.BITNET@cornellc.cit.cornell.edu (A SHOW OF HANDS) writes: >> for(i=0;a[i]=!'\0';i++) >The =! has meanings you are not ready for. >Howard C. Johnson Sorry about this but, ... I HATE being told I'm not ready for something! Just in case (A SHOW OF HANDS) feels the same way ... Using =! instead of != in this case means that you are ASSIGNING the logical negation of '\0'. And '\0' equals 0. And !0 equals 1. So, a[i] is being set equal to 1. Since the value of the assignment is one (i.e. it is TRUE) and the phrase "a[i]=!'\0'" is the conditional part of a for loop, the loop would never exit. There now. Isn't that special? :-) Don White zehntel!donw Box 271177 Concord, CA. 94527-1177