Re: function
- From: "Joachim Schmitz" <nospam.jojo@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 31 May 2008 17:17:20 +0200
Bill Cunningham wrote:
"Joachim Schmitz" <nospam.jojo@xxxxxxxxxxxxxxxxxx> wrote in messagefor(c=1;c<=num;c++) /* if you want to loop num times */
news:g1rpes$mp7$1@xxxxxxxxxxxx
[snip]
while (num--) fputc(a, fp);
fclose(fp);
return 0;
}
Still needs some error checking (num>=0, fp != NULL, fclose and fput
worked)
BillBye, Jojo
While(num--) What's that? Is that the same as what I was thinking
here.
int c;
for(c=1;c<num;c++)
It's equivalent, just counting backwards and not needing yet another
variable
Bye, Jojo
.
- References:
- function
- From: Bill Cunningham
- Re: function
- From: Joachim Schmitz
- Re: function
- From: Bill Cunningham
- function
- Prev by Date: Re: function
- Next by Date: strtok question
- Previous by thread: Re: function
- Next by thread: Re: function
- Index(es):
Relevant Pages
|