answersLogoWhite

0

"GOTO" . . . goes to the line number or label indicated, continues program execution from there,

forgets where it came from and never looks back.

"GOSUB" . . . goes to the line number or label indicated and continues program execution from there,

but remembers where it came from; as soon as it reaches a "RETURN" command, returns to the command

that immediately follows "GOSUB".

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is a label in Qbasic?

In QBasic, a label is a named identifier that marks a specific line in the code, allowing for easy reference and control flow manipulation. Labels are defined by a name followed by a colon (e.g., LABEL_NAME:) and can be used in conjunction with statements like GOTO or GOSUB to direct the program's execution to that point. They help in organizing code and managing loops or functions. However, excessive use of GOTO with labels can lead to "spaghetti code," making programs harder to read and maintain.


What is goto in qbasic?

In QBasic, the GOTO statement is used to transfer control to a specific line in a program, allowing for non-linear execution. It can direct the program flow to any labeled line, facilitating loops or conditional branching. However, excessive use of GOTO can lead to "spaghetti code," making programs harder to read and maintain. Therefore, it's generally recommended to use structured programming constructs like loops and conditionals instead.


Difference between goto and continue statement in c language?

In continue statement, we immediately continue next step through loop In go to statement, we go to in perfect label which we call.


WAP to reverse the supplied number without using string manipulators in qbasic?

10. input number 20. let accumulator = 0 30. if number > 0 then goto 80 40. let digit = number % 10 50. let accumulator = accumulator * 10 + digit 60. let number = number / 10 70. goto 30 80. print accumulator


What has the author John Goto written?

John Goto has written: 'Shotover' 'The now of here' 'Goto' 'Goto'


What is the difference between looping statements - c program?

Repetition. For example the following lines do the same thing: while (expression) statement; LABEL: if (expression) {statement; goto LABEL; } Or these: for (exp1; exp2; exp3) statement; exp1; LABEL: if (exp2) {statement; exp3; goto LABEL; }


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: // ...


Why is goto statement harmful?

It isn't. True, you can write bad code with goto, but you can do that without goto as well.


When was Satoshi Goto born?

Satoshi Goto was born in 1971.


When was Meisei Goto born?

Meisei Goto was born in 1932.


When did Meisei Goto die?

Meisei Goto died in 1999.


When was Jin Goto born?

Jin Goto was born in 1968.