Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
if (x > 0) goto positive;
else goto negative;
positive:
printf("pos\n"); goto both;
negative:
printf("neg\n");
both:
...

View file

@ -0,0 +1 @@
goto (x > 0 ? positive : negative);

View file

@ -0,0 +1,5 @@
for (i = 0; ...) {
for (j = 0; ...) {
if (condition_met) goto finish;
}
}

View file

@ -0,0 +1,5 @@
goto danger;
for (i = 0; i < 10; i++) {
danger: /* unless you jumped here with i set to a proper value */
printf("%d\n", i);
}

View file

@ -0,0 +1,24 @@
char *str;
int *array;
FILE *fp;
str = (char *) malloc(100);
if(str == NULL) {
return;
}
fp=fopen("c:\\test.csv", "r");
if(fp== NULL) {
free(str );
return;
}
array = (int *) malloc(15);
if(array==NULL) if(fp== NULL) {
free(str );
fclose(fp);
return;
}
...// read in the csv file and convert to integers

View file

@ -0,0 +1,25 @@
char *str;
int *array;
FILE *fp;
str = (char *) malloc(100);
if(str == NULL)
goto: exit;
fp=fopen("c:\\test.csv", "r");
if(fp== NULL)
goto: clean_up_str;
array = (int *) malloc(15);
if(array==NULL)
goto: clean_up_file;
...// read in the csv file and convert to integers
clean_up_array:
free(array);
clean_up_file:
fclose(fp);
clean_up_str:
free(str );
exit:
return;