Path: utzoo!utgpu!water!watmath!clyde!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.lang.c Subject: for(;;) loop errors (was Re: What does Z["ack"] = 5 mean?) Message-ID: <286@lakart.UUCP> Date: 14 Oct 88 22:17:42 GMT References: <6945@cdis-1.uucp> Organization: Lakart Corporation, Newton, MA Lines: 30 From article <6945@cdis-1.uucp>, by tanner@cdis-1.uucp (Dr. T. Andrews): > In article <4700019@m.cs.uiuc.edu>, kenny@m.cs.uiuc.edu writes: > ) ...implementors, notably Encore, have been lax about implementing > ) integer[pointer] and integer +- pointer. It is unwise to depend on > ) either form's working in portable code; ... > > It is also possible that compiler writers will get the "for" loop > handling wrong. It is unwise to depend on "for" loops in portable > code. Use a "while" loop instead. > -- > ...!bikini.cis.ufl.edu!ki4pv!cdis-1!tanner ...!bpa!cdin-1!cdis-1!tanner > or... {allegra killer gatech!uflorida decvax!ucf-cs}!ki4pv!cdis-1!tanner I agree with Dr. Andrews in part: we use the Greenhills C compiler here, and it fries it's mind on: char a; int i = 2; a = i["Hello World"]; However I would have thought that any compiler that can't do for loops properly is gonna die real fast. I personally do not use the a = i["..."]; form ever, so that is not too much of a problem, but if I have to ditch for loops I'll go out and buy another compiler. -- dg@lakart.UUCP - David Goodenough +---+ | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@harvard.harvard.edu +---+