Re: How while loop works
- From: somenath <somenathpal@xxxxxxxxx>
- Date: Mon, 27 Aug 2007 02:31:55 -0700
Firstly, I would just like to point out that it's rarely a good idea toMany Many thanks Richard Heathfield for the explanation.I would like
use goto (in fact, I've never come across a good reason to use it in
"real" code).
But here, your reason for using it is to help to deepen your
understanding of C, and that's a pretty good reason, so let's look at
tell you that I have seen use of goto in real code.It is a SNMP
protocol implementation. There for different condition one function
has to set error code in some specif structure and for some specific
error it has to set the value in some variable(structure) and continue
with in same function , for some error condition it simply return
error code and for successfull condition it has to set specific value
to specific structure.
I dont know if it could have been written in better way with out
goto .
But the code I posted purely to understand the while loop in C.
Thanks once again.
.
- References:
- How while loop works
- From: somenath
- Re: How while loop works
- From: Richard Heathfield
- How while loop works
- Prev by Date: Re: basic source character set
- Next by Date: Re: OT - Re: Malcolm's new book - Chapter 1 review
- Previous by thread: Re: How while loop works
- Next by thread: Webpage Input
- Index(es):
Relevant Pages
|