fonction toto(x) { x=x.replace(/A/g,"Avancer(0.125);"); x=x.replace(/R/g,"Reculer(0.125);"); x=x.replace(/D/g,"TournerDroite(90);"); x=x.replace(/G/g,"TournerGauche(90);"); eval(x); } B=Point3D("B",1,1,1); AttacherTortue(B); programme="A"; for (i=0; i<3; i++){ programme=programme.replace(/A/g,"AGADADAGA"); } toto(programme);