When to use goto instead of structure control structure?

Possible duplicates:
Acceptable use of goto for error management in C?
Examples of good gotos in C or C ++ is
GOTO still considered harmful? Should I use GOTO or not?

The goto operation seems very risky to use. When would it be a good scenario to use a goto statement instead of nesting control statements? Is this even the preferred way to control the flow of a program?

0


a source to share


1 answer


GoTo is only good for error handling in VB6 when you are programming in assembly or Pic. When programming at a high level, it was considered bad practice because it "breaks" the flow of program control and also makes the code more difficult to read.



+1


a source







All Articles