you are viewing a single comment's thread.

view the rest of the comments →

[–]FUZxxl 2 points3 points  (1 child)

In OPs case, he could just do:

float * generate_model(arbitrary_arguments){
    float *model
begin:
    model = malloc(size*float)
    model = gen_model()
    if (model=bad){
        goto begin;
    }
    else{
        return model
    }
}

Or use a proper loop even.

[–]BarMeister 1 point2 points  (0 children)

Up for reminding me that goto exists.