Brett McCoy wrote:
> On Mon, Apr 28, 2008 at 4:09 PM, Ali Mahmoud <[EMAIL PROTECTED]> wrote:
>> the attached file is a c code give me the following error :
>>
>>    goto hypasses intialization of local variable.
>>
>>   any help in that please
> 
> Yes... don't use goto!
> 
> Who in the world said you should use it?
> 
> If you find the need to use goto, it's time to rethink the design of
> your program

Not necessarily, but the cases where the use of goto is valid are 
extremely limited/rare.


> Using goto is a very old and outdated way of jumping around.  C also
> provides setjmp and longjmp for crude exception handling and these
> should be used sparingly (they are best used in conjunction with a
> hardware API and you need to deal with some kind of hardware failure).
> 
> Use of goto is even more frowned upon the gets()!

Goto is considered "harmful" but not "dangerous".

Beginners, though, should not be using it.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to