π
<-

Traduction d'un programme :/

Pour le TI-Basic sur Nspire

Traduction d'un programme :/

Postby nono92160 » 02 Feb 2015, 09:51

Quel qu'un pourrais m'aider a traduire ce programme pour la nspire ?


Code: Select all
prgmZCLEAR
: dim([A])→L1:L1(1)→L
: dim([A])→L1:L1(2)→C
: {L,C}→dim([B]
: [A]→[B]
: For (X,1,L
:   For (Y,1,C
:     If [A](X,Y)≠0 : Then
:       For(Z,1,L
:         If Z≠Y and X≠Y : Then
:           If [A](X,Y)=1 and [A](X,Z)=1 and [A](Y,Z)=1 : Then
:             If [B](X,Z)=1 : Then
:               0→[B](X,Z)
:             End
:           End
:         End
:       End
:     End
:   End
: End
: FnOff
: .1→Xmin
: 99→Xscl
: .1→Ymin
: 99→ Yscl
: ClrDraw
: Text(1,1,"IMMEDIATEMENT ANTERIEURE"
: 13→H
: 3→I
: For (P,1,C
:   If P=7 or P=14 or P=21 or P=28 : Then
:     Pause
:     ClrDraw
:     Text(1,1,"IMMEDIATEMENT ANTERIEURE"
:     13→H
:     3→I
:   End
:   I+7→I
:   13→H
:   Text(I,1,P
:   Text(I,10,"="
:   For(R,1,L
:     If [B](R,P)=1 : Then
:       H+9→H
:       Text(I,H,R
:     End
:   End
: End
: Pause
: -1→H
: 1→J
: 3→I
: ClrDraw
: Lbl 7
: For(W,1,C
:   0→N
:   If [A](1,W)≠9:1→N
: End
: If N=0:Goto 9
: 1+H→H
: I+7→I
: 11→J
: If H=0 or fPart(H/7)=0 : Then
:   10→I
:   11→J
:   If H≠0 : Pause
:   ClrDraw
:   Text(1,5,"NIVEAU = TACHES"
: End
: Text(I,1,H
: Text(I,8,"="
: For(W,1,C
:   0→N
:   For(Z,1,L
:     If [B](Z,W)=1 : 1+N→N
:   End
:   If N=0 and [A](1,W)≠9 : Then
:     J+11→J
:     Text(I,J,W
:     9→[A](1,W)
:   End
: End
: For(R,1,C
:   If [A](1,R)=9 : Then
:     For (P,1,C
:       0→[B](R,P)
:     End
:   End
: End
: Goto 7
: Lbl 9
: Text(57,75,"FINI"



? :/ j'ai essayé plein de fois mais à chaque fois ça merdouille ....
User avatar
nono92160
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Level up: 78.1%
 
Posts: 39
Joined: 09 Jan 2015, 20:02
Gender: Not specified
Calculator(s):
MyCalcs profile
Class: Derniere année BTS MUC

Re: Traduction d'un programme :/

Postby Bisam » 02 Feb 2015, 12:48

Il y a certains symboles qui sont mal passé... Je les ai touscorrigé quelques-uns, mais je ne suis pas certains de moi pour certains d'entre eux.
Par ailleurs, le parseur du forum ne sait pas qu'un guillemet n'a pas besoin d'être fermé en fin de ligne, ce qui fausse la coloration syntaxique... J'ai corrigé cela également.

Enfin, si tu ne nous dis pas ce que doit faire le programme, cela va être difficile de le traduire...
Néanmoins, je vais également ajouter de l'indentation pour améliorer la lisibilité.

Code: Select all
prgmZCLEAR
: dim([A])→L1
: L1(1)→L
: L1(2)→C
: {L,C}→dim([B]
: [A]→[B]
: For (X,1,L)
:   For (Y,1,C)
:     If [A](X,Y)≠0
:     Then
:       For(Z,1,L)
:         If Z≠Y and X≠Y
:         Then
:           If [A](X,Y)=1 and [A](X,Z)=1 and [A](Y,Z)=1
:           Then
:             If [B](X,Z)=1
:             Then
:               0→[B](X,Z)
:             End
:           End
:         End
:       End
:     End
:   End
: End
: FnOff
: .1→Xmin
: 99→Xscl
: .1→Ymin
: 99→ Yscl
: ClrDraw
: Text(1,1,"IMMEDIATEMENT ANTERIEURE")
: 13→H
: 3→I
: For (P,1,C)
:   If P=7 or P=14 or P=21 or P=28
:   Then
:     Pause
:     ClrDraw
:     Text(1,1,"IMMEDIATEMENT ANTERIEURE")
:     13→H
:     3→I
:   End
:   I+7→I
:   13→H
:   Text(I,1,P)
:   Text(I,10,"=")
:   For(R,1,L)
:     If [B](R,P)=1
:     Then
:       H+9→H
:       Text(I,H,R)
:     End
:   End
: End
: Pause
: -1→H
: 1→J
: 3→I
: ClrDraw
: Lbl 7
: For(W,1,C)
:   0→N
:   If [A](1,W)≠9:1→N
: End
: If N=0:Goto 9
: 1+H→H
: I+7→I
: 11→J
: If H=0 or fPart(H/7)=0
: Then
:   10→I
:   11→J
:   If H≠0:Pause
:   ClrDraw
:   Text(1,5,"NIVEAU = TACHES")
: End
: Text(I,1,H)
: Text(I,8,"=")
: For(W,1,C)
:   0→N
:   For(Z,1,L)
:     If [B](Z,W)=1:1+N→N
:   End
:   If N=0 and [A](1,W)≠9
:   Then
:     J+11→J
:     Text(I,J,W)
:     9→[A](1,W)
:   End
: End
: For(R,1,C)
:   If [A](1,R)=9
:   Then
:     For (P,1,C)
:       0→[B](R,P)
:     End
:   End
: End
: Goto 7
: Lbl 9
: Text(57,75,"FINI")
User avatar
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Level up: 69.6%
 
Posts: 5670
Joined: 11 Mar 2008, 00:00
Location: Lyon
Gender: Male
Calculator(s):
MyCalcs profile

Re: Traduction d'un programme :/

Postby Levak » 02 Feb 2015, 12:57

J'ai indenté (à la main) pour au moins y voir plus clair.

EDIT : Ça ressemble à de l'ordonnancement...
Responsable design/graphique de TI-Planet
I do not get mad at people, I just want them to learn the way I learnt.
ImageTNOC [topic][DL]
nClock [topic][DL]
HideManager [topic][DL]
ZLock [topic][DL]
Theme Editor [topic][DL]
Mes programmes
User avatar
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 98.9%
 
Posts: 6414
Images: 22
Joined: 27 Nov 2008, 00:00
Location: 0x1AACC355
Gender: Male
Calculator(s):
MyCalcs profile
Class: BAC+5: Epita (ING3)

Re: Traduction d'un programme :/

Postby nono92160 » 02 Feb 2015, 14:54

c'est exactement ça ! ordonnancement de tache !!
User avatar
nono92160
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Level up: 78.1%
 
Posts: 39
Joined: 09 Jan 2015, 20:02
Gender: Not specified
Calculator(s):
MyCalcs profile
Class: Derniere année BTS MUC

Re: Traduction d'un programme :/

Postby nono92160 » 02 Feb 2015, 17:52

User avatar
nono92160
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Level up: 78.1%
 
Posts: 39
Joined: 09 Jan 2015, 20:02
Gender: Not specified
Calculator(s):
MyCalcs profile
Class: Derniere année BTS MUC


Return to Nspire-Basic

Who is online

Users browsing this forum: No registered users and 5 guests

-
Search
-
Social TI-Planet
-
Featured topics
Ndless for CX 4.5.5 / CX II 6.2.0
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
12345
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
2515 utilisateurs:
>2499 invités
>8 membres
>8 robots
Record simultané (sur 6 mois):
43991 utilisateurs (le 10/09/2025)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)