home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!cs.yale.edu!rtnmr.chem.yale.edu!rescorla
- From: rescorla@rtnmr.chem.yale.edu (Eric Rescorla)
- Subject: Re: C for loop
- Message-ID: <1992Nov20.160200.11698@cs.yale.edu>
- Sender: news@cs.yale.edu (Usenet News)
- Nntp-Posting-Host: rtnmr.chem.yale.edu
- Organization: Rescorla for himself.
- References: <Bxzonp.2oH@research.canon.oz.au> <3892@dozo.and.nl> <1992Nov20.134343.4978@magnus.acs.ohio-state.edu>
- Date: Fri, 20 Nov 1992 16:02:00 GMT
- Lines: 22
-
- In article <1992Nov20.134343.4978@magnus.acs.ohio-state.edu> ckkoo@magnus.acs.ohio-state.edu (Chee K Koo) writes:
- >I am new to C programming, while i was doing a numerical analysis
- >program which uses many for loop
- >here is the loop looks like
- >for(i=1;i<=n;i++);
- >{
- >}
- >i put the ";" after the loop header, when the program is excuted, the loop
- >is skipped, however, it works fine when the ";" is removed.
- >I just want to find out why the compiler does not catch it during
- >compilation. It is compiled with UNIX gcc.
- Because it's perfectly legal, and not even guaranteed to be stupid.
- -Ekr
-
-
-
-
- --
- -------------------------------------------------------------------------------
- Eric Rescorla, DoD#431 (Nighthawk S) rescorla@rtnmr.chem.yale.edu
- Former chemist now CM400 mechanic ekr@eitech.com(preferred)
- "Meet the new boss, same as the old boss."
-