answersLogoWhite

0

Actually, it is not so, so there really isn't a reason. The only reason why there might be problems would be if the code is messier and harder to debug.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the Meaning of go to statements in c?

A 'goto' statement is an unconditional requirement to go to that part of the program. As such, statements like these cause programs to become unstructured and should be avoided if possible. Goto statements lead to some sloppy and unreadable logic.


What is meant by label in c program?

Labels are used in conjunction with goto statements. A goto statement allows us to jump forwards or backwards to a given label: int x; again: printf ("Enter a non-zero number: "); scanf ("%d\n", &x); if (x==0) { printf ("Input error: number must be non-zero!\n"); goto again; } Goto statements should generally be avoided in favour of structured alternatives. The above example would be much better written using a loop: int x = 0; while (x==0) { printf ("Enter a non-zero number: "); scanf ("%d\n", &x); if (x==0) printf ("Input error: number must be non-zero!\n"); } Goto statements are ideally suited to jumps out of a nested scope as an alternative to using multiple break statements. while (true) { // ... while (true) { // ... if (z==42) goto end; // break out of both loops } } end:


Why goto statements are not available in java?

Using "goto", even in languages where it is available, is generally considered bad programming practice.


What is go-to unconditional in c plus plus?

An unconditional goto is a goto that has no associated conditional expression. The following example demonstrates conditional and unconditional goto statements. int x=rand(); if (x) goto label_1; // conditional goto (when x is non-zero) else goto label_2; // conditional goto (when x is zero) label_1: // ... goto label_3; // unconditional goto (jump past label_2) label_2: // ... label_3: // ...


In Just Basic what does the command error do?

The keyword error can be put in a line that sayson error goto [label]This will send the program to that label if any error is encountered.


Why can't a goto statement be considered a looping structure?

A goto is an unconditional jump within the same procedure. Languages that do not support the notion of procedures (also known as subroutines or functions) are simply treated as being one large procedure. Regardless, the normal flow of execution within any one procedure is always from the top down, one statement after the other -- unless a goto is encountered. Goto statements allow the programmer to alter the flow of execution within a procedure. When a goto jumps backwards, this may result in statements that have already been executed to execute again. Every time that same goto is encountered, those same statements will execute over and over, thus creating a loop. However, a goto statement cannot be considered a loop because not all goto statements actually create loops. A goto statement that jumps forwards within a procedure rather than backwards cannot be considered a loop; it is bypassing code, not repeating it. By the same token, a goto statement that jumps backwards might begin executing a section of code that was previously bypassed by an earlier goto. So, without physically reading the code and following the flow of execution, there's simply no way to tell if a goto is a creating a loop or not. When a programming language supports structured looping statements, including for, for-each, while, do-while and repeat, then it becomes crystal clear that a loop really is being executed. While programmers can obviously use goto statements to create loops, there is no benefit in doing so. After all, code that is easy to read is also easy to maintain. If you want a loop, be specific and use the the appropriate loop structure. Although you should avoid using goto statements to create loop, that doesn't mean to say goto statements should be avoided altogether. For instance, when you have a nested loop (a loop within a loop) where you wish to break out of the outer loop from within the inner loop, a goto statement is by far the most efficient means of achieving that. Also keep in mind that in most cases a goto statement will be used in conjunction with an if statement which will decide whether the goto statement should be invoked or not, or perhaps to decide between two different goto statements. A switch structure extends this notion to cater for two or more goto statements, each of which is handled by a case label, thus giving greater structure and control over jumps.


What is the purpose of goto statement in c?

The purpose of goto is to skip over code and gotoa named label.Goto is not as bad to use as you will read in many places, goto has a bad name from BASIC where gotoproduced spaghetti code that was impossible follow and understand.In C you can only goto go to a named label in the same function that the goto statement is in. The named label can be prior or post of the goto statement.Goto is very useful (in a limited scope) to jump over a bunch of if statements that are redundant because it has already been established that a particular section of code in the function needs to be executed. Judicious use of goto can improve the human readability of the code and also improve the programs performance.


How do you uninstall Xmarks?

If your on windows goto the control panel -programs and features and uninstall it there.


What is go to statement and also show the flow chart of go to?

A goto is equivalent to a JMP (jump) instruction. In high-level languages we typically use line numbers or user-defined labels to indicate which instruction a goto should jump to while the compiler or interpreter will calculate the machine address for us. Goto statements are typically used in conjunction with branch control statements (if statements), however in high-level structured languages there is rarely the need to use a goto. Indeed, code that jumps about in an unstructured manner can be difficult to read and maintain.


Does java have goto?

Because goto statements usually result in hard to read code. This was a feature of C++ which the creators of Java decided they didn't want to allow.


Why did Edsger Dijkstra find the goto statement to be harmful?

The short answer is that goto statements generally cause messy and hard to read code. This reduces the ability to update that code. Also it was proven that nearly everything that goto was used for could be done using other control statements like the while loop or function calls. for a more informative answer go here http://www.cs.utexas.edu/~EWD/transcriptions/EWD02xx/EWD215.HTML


Give some examples of keywords?

Java KeywordsabstractassertbooleanbreakbytecasecatchcharclassconstcontinuedefaultdodoubleelseenumextendsfinalfinallyfloatforgotoifimplementsimportinstanceofintinterfacelongnativenewpackageprivateprotectedpublicreturnshortstaticstrictfpsuperswitchsynchronizedthisthrowthrowstransienttryvoidvolatilewhileThe Java Language Specification makes a special note of the "goto" and "const" keywords:The keywords const and goto are reserved, even though they are not currently used. This may allow a Java compiler to produce better error messages if these C++ keywords incorrectly appear in programs. C++ Keywordsandand_eqasmautobitandbitorboolbreakcasecatchcharclasscomplconstconst_castcontinuedefaultdeletedodoubledynamic_castelseenumexplicitexportexternfalsefloatforfriendgotoifinlineintlongmutablenamespacenewnotnot_eqoperatororor_eqprivateprotectedpublicregisterreinterpret_castreturnshortsignedsizeofstaticstatic_caststructswitchtemplatethisthrowtruetrytypedeftypeidtypenameunionunsignedusingvirtualvoidvolatilewchar_twhilexorxor_eq