Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #1904
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ike Naar <ike@sverige.freeshell.org> |
| Newsgroups | comp.programming |
| Subject | Re: repeating something n times |
| Date | Fri, 6 Jul 2012 12:57:19 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 23 |
| Message-ID | <slrn3vfsjvdo5f.9li.ike@sverige.freeshell.org> (permalink) |
| References | <repeat-20120705210751@ram.dialup.fu-berlin.de> <jt6kvi$7ah$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 6 Jul 2012 12:57:19 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="mX321DN/BskaPeu9dpMNqQ"; logging-data="17957"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19J24xn5Qts2FfzQJxY9deB" |
| User-Agent | slrn/0.9.9p1 (NetBSD) |
| Cancel-Lock | sha1:tlMh1GptOzu9TIMHMZTNm2L09cc= |
| Xref | csiph.com comp.programming:1904 |
Show key headers only | View raw
On 2012-07-06, Charles Richmond <numerist@aquaporin4.com> wrote: > "Stefan Ram" <ram@zedat.fu-berlin.de> wrote in message > news:repeat-20120705210751@ram.dialup.fu-berlin.de... >> It is funny how many languages fail to give a means to >> repeat something n times. >> >> In Logo, one can write: >> >> repeat 4 >> >> to repeat something 4 times, but in C one needs >> >> for( int i = 0; i < 3; ++i ) >> > > In C, you're gonna need: > > for(i = 0; i < 4; ++i) > > Where "i" is declared earlier. You can *not* declared "i" as integer... > within the for() of the statement. In C++ you can, but *not* in C. As from the 1999 C standard, you can.
Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: repeating something n times "Charles Richmond" <numerist@aquaporin4.com> - 2012-07-06 07:16 -0500 Re: repeating something n times Ike Naar <ike@sverige.freeshell.org> - 2012-07-06 12:57 +0000
csiph-web