home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!ckkoo
- From: ckkoo@magnus.acs.ohio-state.edu (Chee K Koo)
- Subject: C for loop
- Message-ID: <1992Nov20.134343.4978@magnus.acs.ohio-state.edu>
- Sender: news@magnus.acs.ohio-state.edu
- Nntp-Posting-Host: magnusug.magnus.acs.ohio-state.edu
- Organization: The Ohio State University
- References: <3870@dozo.and.nl> <Bxzonp.2oH@research.canon.oz.au> <3892@dozo.and.nl>
- Date: Fri, 20 Nov 1992 13:43:43 GMT
- Lines: 18
-
- 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.
-
- Thanks
-
- C. K. koo
-
-