Written by

Question kavin kumar · Aug 8, 2017

Do and GOTO

Major difference between GOTO and do command?

Comments

John Murray · Aug 8, 2017

When you GOTO you never come back.

With a DO you do.

0
Dmitry Maslennikov  Aug 8, 2017 to John Murray

With links to the original documentation, I think it may become more useful.

GOTO and DO

Not so good practice to use GOTO in a code, but could be quite useful, when you, for example, debugging through terminal, you can resume execution after BREAK.

0
Evgeny Shvarov · Aug 8, 2017

With DO you can pass parameters into method or procedure/function and get the result back, with GOTO you can't. 

0
Rubens Silva · Aug 8, 2017

NOTE:
Expert programmers try to keep away from using GOTO because it can break greatly the code workflow consistency. This is a basic concept for using structured programming.
So, before you think about using it, try to render the same effect using subroutines and methods instead.

0