Define calc_instr_astro()= Prgm :Local c :Local obj,ocu,gro :Local chm,chd :Local dia,gro,lum :Local foc,dia,ouv :0→c :setMode(5,2) :Lbl a0 :Disp " ★ Choisissez et [enter] pour commencer ★" :Disp " Grossissement........................................> 1" :Disp " Champ...................................................> 2" :Disp " Luminosité.............................................> 3" :Disp " Ouverture (astro et photo)......................> 4" :Disp " Grossissement du microscope................> 5" :Disp " --Entrez un 0 si vouv voulez la réponse--" :getKey(1) :Request "Votre choix :",c :If c>0 and c<6 Then : If c=1:Goto a1 : If c=2:Goto a2 : If c=3:Goto a3 : If c=4:Goto a4 : If c=5:Goto a5 :Else : Goto fin :EndIf :©----------------------a1 :Lbl a1 :0→obj:0→ocu:0→gro :Disp " --Entrez un 0 si vouv voulez la réponse--" :Request "Focale de l'objectif (long. de instr.)",obj :Request "Focale de l'oculaire ",ocu :Request "Grossissement ",gro :If obj≤0 and ocu≤0 or obj≤0 and gro≤0 or ocu≤0 and gro≤0 : Goto x :©----------------------calc1 :If obj>0 and ocu>0 Then :((obj)/(ocu))→gro : Goto b1 :EndIf :If obj>0 and gro>0 Then :((obj)/(gro))→ocu : Goto b1 :EndIf :If ocu>0 and gro>0:ocu*gro→obj :©----------------------b1 :Lbl b1 :For i,1,4:Disp "":EndFor :Disp "Focal de l'objectif",obj :Disp "Focal de l'oculaire",ocu :Disp "Grossissement",gro :Disp "" :Disp " Appuyez sur [enter] pour continuer" :getKey(1) :Goto fin :©----------------------a2 :Lbl a2 :0→chm:0→chd :For i,1,3:Disp "":EndFor :Disp " --Entrez un 0 si vouv voulez la réponse--" :Request "Champ en mètres",chm :If chm>0:Goto b2 :Request "Champ en degrès",chd :If chd>0: Goto b2 :©For i,1,4:Disp "":EndFor :Goto x : :Disp "" :Disp " appuyez sur [enter] pour continuer" :Disp "" :getKey(1) :©----------------------calc2 :Lbl b2 :If chm>0 Then :((chm)/(17.45))→chd :Else : chd*17.45→chm :EndIf :©----------------------b2 :For i,1,3:Disp "":EndFor :Disp "Champ en mètres",chm :Disp "Champ en degrès",chd :For i,1,3:Disp "":EndFor :Disp " appuyez sur [enter] pour continuer" :getKey(1) :Goto fin :©----------------------a3 :Lbl a3 :0→dia:0→gro:0→lum :For i,1,3:Disp "":EndFor :Disp " --Entrez un 0 si vouv voulez la réponse--" :Request "Diamètre objectif",dia :Request "Grossissement",gro :Request "Luminosité",lum :For i,1,2:Disp "":EndFor :If dia≤0 and gro≤0 or dia≤0 and lum≤0 or gro≤0 and lum≤0 : Goto x :©----------------------calc3 :If dia>0 and gro>0 Then :(((dia)/(gro)))^(2)→lum : Goto b3 :EndIf :If dia>0 and lum>0 Then :((dia)/(√(lum)))→gro : Goto b3 :EndIf :If gro>0 and lum>0:gro*√(lum)→dia :©----------------------b3 :Lbl b3 :For i,1,3:Disp "":EndFor :Disp "Diamètre de l'ouverture",dia :Disp "Grossissement",gro :Disp "Luminosité",lum :For i,1,2:Disp "":EndFor :Disp " Appuyez sur [enter] pour continuer" :getKey(1) :Goto fin :©----------------------a4 :Lbl a4 :0→foc:0→dia:0→ouv :Disp " --Entrez un 0 si vouv voulez la réponse--" :Request "Focale",foc :Request "Diamètre de l'objectif",dia :Request "Ouverture réelle",ouv :If foc≤0 and dia≤0 or foc≤0 and ouv≤0 or dia≤0 and ouv≤0 : Goto x :©----------------------calc4 :If foc>0 and dia>0 Then :((foc)/(dia))→ouv : Goto b4 :EndIf :If foc>0 and ouv>0 Then :((foc)/(ouv))→dia : Goto b4 :EndIf :If dia>0 and ouv>0:dia*ouv→foc :©----------------------b4 :Lbl b4 :Disp "" :Disp "Focale",foc :Disp "Diamètre",dia :Disp "Ouverture",ouv :©----------------------commentaires :Disp "" :If ouv<6 Then : Disp " Luminosité bonne, résolution faible" : Disp "bon pour l'observation du ciel profond" :EndIf :If ouv>5 and ouv<10 Then : Disp "Luminosité moyenne, résolution moyenne" : Disp "Observation du ciel profond et des planètes" :EndIf :If ouv>9 Then : Disp " Luminosité faible, résolution bonne" : Disp " Bien pour l'observation des planètes" :EndIf :Disp "" :Disp " Appuyez sur [enter] pour continuer" :getKey(1) :Goto fin :©----------------------a5 :Lbl a5 :0→ocu:0→obj:0→gro :For i,1,2:Disp "":EndFor :Disp " --Entrez un 0 si vouv voulez la réponse--" :Request "Oculaire de ",ocu :If ocu≤0:Goto x :Request "Objectif de",obj :If obj≤0:Goto x :Disp "" :©----------------------calc5 :ocu*obj→gro :©----------------------b5 :For i,1,3:Disp "":EndFor :Disp "Le grossissement du microscope est de",gro :For i,1,3:Disp "":EndFor :Disp " appuyez sur [enter] pour continuer" :getKey(1) :Goto fin :©----------------------oups! :Lbl x :For i,1,3:Disp "":EndFor :Disp " Désolé, mais je n'ai pas asser d'argument" :Disp " pour pouvoir répondre a votre question." :Disp " appuyez sur [enter] pour continuer" :For i,1,3:Disp "":EndFor :©Disp" Appuyez sur [enter] pour continuer" :©getKey(1) :©----------------------fin :Lbl fin :0→c :For i,1,3:Disp "":EndFor :Disp " si vous voulez recommencer entrer 1" :Disp " si non pour terminer entrer 0" :For i,1,3:Disp "":EndFor :Disp " Appuyez sur [enter] pour continuer" :getKey(1) :Request "Votre choix :",c :If c=1:Goto a0 :For i,1,4:Disp "":EndFor :Disp " Entrer pour sortir !" :getKey(1) :EndPrgm