mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-10 08:44:28 +02:00
Removed section about goto
This commit is contained in:
@@ -364,23 +364,6 @@ int main (int argc, char** argv){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verwendung von "goto" in C
|
|
||||||
typedef enum { false, true } bool;
|
|
||||||
bool desaster = false;
|
|
||||||
int i, j;
|
|
||||||
for(i=0; i < 100; ++i){
|
|
||||||
for (j=0; j < 100; ++j){
|
|
||||||
if ((i + j ) >= 150){
|
|
||||||
desaster = true;
|
|
||||||
}
|
|
||||||
if (desaster){
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
error:
|
|
||||||
printf("Ein Fehler ist aufgetreten bei i = %d & j ? %d\n", i, j);
|
|
||||||
|
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
// Typenumwandlung
|
// Typenumwandlung
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user