• # Mémoriser l'appel

    Posté par (site web personnel) . En réponse au message Optimisation de tests dans des boucles. Évalué à 2.

    Je ne connais pas trop le fortran et ne sais pas si c'est faisable, mais voilà comment je verrais les choses :

     case (0)
     ma_fonction = instructions_zero;
    case (1)
     ma_fonction = instructions_un;
    [...]
    case (m)
     ma_fonction = instructions_m;
    for i1 = 1,maxi1
     for i2 = 1,maxi2
     for [...]
     for in = 1,maxin
     instructions_generales();
     ma_fonction(il, i2, ..., in);
     end
     [...] end
     end
    end