Je viens de tester que la syntaxe suivante fonctionne :
- Code: Tout sélectionner
test()
Prgm
Local test2, test3
Define test3()=Prgm
test2()
EndPrgm
Define test2()=Prgm
Disp "You Lose the game !"
EndPrgm
test3()
EndPrgm
test()
Prgm
Local test2, test3
Define test3()=Prgm
test2()
EndPrgm
Define test2()=Prgm
Disp "You Lose the game !"
EndPrgm
test3()
EndPrgm
zorglub13 a écrit:Bonjour,
je viens de tester ce code et j'ai - program not found - au moment de l'appel de test2 ?
Ton code tu l'a fais tourner sur une ti68k ou une nspire ? Je suis sur un émulateur graph89 avec l'os du voyager 200 de TI.
À+
PROGRAM:CALCUL
:" DEFINITION DU NOMBRE D'ESSAIS
:3 -> Q
:" DEFINITION DE LA VALEUR MAX
:20 -> S
:" MENU GENERAL
:Lbl A
:ClrHome
:Menu("TRAVAIL","ADDITION",B,"SOUSTRACTION",C,"MULTIPLICATION",D,"DIVISION",E,"QUITTER",F)
:" ADDITIONS
:Lbl B
:randInt(1,S) -> M
:randInt(1,S) -> N
:M+N -> O
:0 -> R
:While R<Q
::ClrHome
::Disp M,"+",N,"="
::Input P
::If O=P
::Then
:::Disp "BRAVO"
:::Q -> R
::Else
:::Disp "ERREUR"
:::1+R -> R
:::If R=Q
:::Then
::::Pause
::::ClrHome
::::Disp "CORRECTION"
::::Disp M,"+",N,"=",O
:::End
::End
: Pause
:End
:Menu("ET MAINTENANT","CONTINUER",B,"MENU",A)
:" SOUSTRACTIONS
:" REMARQUE - INVERSION DE M ET N SI N EST PLUS GRAND QUE M
:" POUR QUE (M-N) NE SOIT PAS NEGATIF
:Lbl C
:randInt(1,S) -> M
:randInt(1,S) -> N
:If M<N
:Then
::M -> O
::N -> M
::O -> N
:End
:M-N -> O
:0 -> R
:While R<Q
::ClrHome
::Disp M,"-",N,"="
::Input P
::If O=P
::Then
:::Disp "BRAVO"
:::Q -> R
::Else
:::Disp "ERREUR"
:::1+R -> R
:::If R=Q
:::Then
::::Pause
::::ClrHome
::::Disp "CORRECTION"
::::Disp M,"-",N,"=",O
:::End
::End
::Pause
:End
:Menu("ET MAINTENANT","CONTINUER",C,"MENU",A)
:" MULTIPLICATIONS
:Lbl D
:randInt(1,S) -> M
:randInt(1,S) -> N
:M*N -> O
:0 -> R
:While R<Q
::ClrHome
::Disp M,"*",N,"="
::Input P
::If O=P
::Then
:::Disp "BRAVO"
:::Q -> R
::Else
:::Disp "ERREUR"
:::1+R -> R
:::If R=Q
:::Then
::::Pause
::::ClrHome
::::Disp "CORRECTION"
::::Disp M,"*",N,"=",O
:::End
::End
::Pause
:End
:Menu("ET MAINTENANT","CONTINUER",D,"MENU",A)
:" DIVISIONS
:Lbl E
:randInt(1,S) -> M
:randInt(1,S) -> N
:M -> O
:M*N -> M
:0 -> R
:While R<Q
::ClrHome
::Disp M,"/",N,"="
::Input P
::If O=P
::Then
:::Disp "BRAVO"
:::Q -> R
::Else
:::Disp "ERREUR"
:::1+R -> R
:::If R=Q
:::Then
::::Pause
::::ClrHome
::::Disp "CORRECTION"
::::Disp M,"/",N,"=",O
:::End
::End
::Pause
:End
:Menu("ET MAINTENANT","CONTINUER",E,"MENU",A)
:" FIN DU PROGRAMME
:Lbl F
:ClrHome
:Disp "A BIENTOT"
:Stop
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 11 invités