if (statement) {
Goto 102;
}
I know it was used in the old dos basic programming language because there was no functions or classes.
if (statement) {
Goto 102;
}
|
|
|
Guest_Axter_*
Guest_Jordan_*
Axter said:
if (statement) {
Do102();
}
TryLabel:
tries = 0;
try {
tries++;
this.ThrowsAnException();
} catch ex as TheException {
if (tries < 3) {
goto TryLabel;
} else {
throw;
}
}
brackett said:
TryLabel:
tries = 0;
try {
tries++;
this.ThrowsAnException();
} catch ex as TheException {
if (tries < 3) {
goto TryLabel;
} else {
throw;
}
}
int tries = 0;
bool tryAgain = false;
while ((tries < 3) && !tryAgain)
{
tryAgain=false
try {
tries++;
this.ThrowsAnException();
} catch ex as TheException {
tryAgain=true
}
}
if (tryAgain) throw;
Void said:
int main()
{
goto skip
int i = 5;
skip:
i++; //error! i not declared!
return i; //error! i not declared!
}
WingedPanther said:
int tries = 0;
bool tryAgain = false;
while ((tries < 3) && !tryAgain)
{
tryAgain=false
try {
tries++;
this.ThrowsAnException();
} catch ex as TheException {
tryAgain=true
}
}
if (tryAgain) throw;