Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!murtoa.cs.mu.oz.au!munnari.oz.au!mimir!hugin!augean!sirius!nt!levels!ccdn From: ccdn@levels.sait.edu.au (DAVID NEWALL) Newsgroups: comp.lang.c Subject: Re: "do ... while ((NULL + 1) - 1);" -- valid C? Message-ID: <1170@levels.sait.edu.au> Date: 17 Aug 89 15:15:36 GMT References: <1043@levels.sait.edu.au> Organization: Sth Australian Inst of Technology Lines: 15 A while ago, ccdn@levels.sait.edu.au (That's me!) wrote: > do > ... > while ((s = strchr(s, ',') + 1) - 1); > > I've been told that this is not valid C Thanks, everyone, for your opinions. I'll remember the rule in future: (Offsets to NULL are non-portable, and should never be used). David Newall Phone: +61 8 343 3160 Unix Systems Programmer Fax: +61 8 349 6939 Academic Computing Service E-mail: ccdn@levels.sait.oz.au SA Institute of Technology Post: The Levels, South Australia, 5095