Gotos ===== ```Example from 1 languages: C // C/C++ program to check if a number is // even or not using goto statement #include <iostream> using namespace std; // function to check even or not void checkEvenOrNot(int num) { if (num % 2 == 0) goto even; // jump to even else goto odd; // jump to odd even: cout << num << " is evenn"; return; // return if even odd: cout << num << " is oddn"; } // Driver program to test above function int main() { int num = 26; checkEvenOrNot(num); return 0; } ``` ```Example from 1 languages: BASIC 10 REM This BASIC program shows the use of the PRINT and GOTO Statements. 15 REM It fills the screen with the phrase "HELLO" 20 PRINT "HELLO" 30 GOTO 20 ``` ```Example from 1 languages: Batchfile :: this would create an endless loop :myLabel goto myLabel ``` ```Example from 1 languages: Jule goto a_label ``` * Languages *with* Gotos include C, BASIC, Batchfile, Jule, SAKO * Languages *without* Gotos include Nim, C3, progsbase, Slope * View all concepts with or missing a *hasGotos* measurement http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasGotos&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22null%22%2C%22data%22%3A%22hasGotos%22%2C%22origData%22%3A%22hasGotos%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D missing http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasGotos&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22!null%22%2C%22data%22%3A%22hasGotos%22%2C%22origData%22%3A%22hasGotos%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D with * Read more about Gotos on the web: 1. https://en.wikipedia.org/wiki/Goto 1. Built with Scroll v178.2.3