differentiate between the use of the GOTO command and RETURN statement
Answers
Answered by
1
Answer:
Goto goes to the destination line, but never comes back. This is a quick road to "spaghetti code."
Gosub/return allows you to jump to some code, do some work, and then return to the calling point. This allows you to create reusable subroutines that can be used from many places.
So seriously: Why are you still using GW-BASIC? It's a terribly outdated language that promotes poor programming practices. I strongly suggest learning Java, C#, or JavaScript.
Similar questions
Chemistry,
2 months ago
Science,
2 months ago
English,
2 months ago
Social Sciences,
5 months ago
Political Science,
11 months ago