Et voilà, c'est juste pour 1 axe, la division, pour faire simple.
Si besoin, je t'envoie pour les 3 axes :
'===================================================
'================== DIVISEUR.BAS ===================
'============ commande du diviseur LORCH ===========
'================ Sulka JUIN 2010 ==================
CLS
PRINT
CHDIR "\QB45\LORCH"
FILES
PRINT " Programme pour DIVISEUR LORCH 37800 pas/tour"
PRINT " DIVISEUR SEUL TAILLAGE MANUEL "
debut:
PRINT " V1006"
PRINT : PRINT
INPUT "Nombre de dents ", nd
IF nd < 10 THEN st = 1: GOTO fichier
IF nd < 100 THEN st = 2: GOTO fichier
IF nd < 1000 THEN st = 3: GOTO fichier
IF nd < 10000 THEN st = 4: GOTO fichier
fichier:
f$ = STR$(nd): f$ = RIGHT$(f$, st)
f$ = "L" + f$ + ".dat"
PRINT
INPUT " Pret ? O/N ", R$
IF R$ = "o" THEN GOTO suite
IF R$ = "O" THEN GOTO suite
RUN
suite:
CHDIR "\QB45\LORCH"
DIM R(400)
OPEN "i", 1, f$
d = 0
lecture:
d = d + 1
INPUT #1, R(d)
IF EOF(1) = 0 THEN GOTO lecture
PRINT
CLOSE
taille:
OPEN "COM1:2400,N,8,1,rs" FOR RANDOM AS #1
FOR t = 1 TO d
SENS = 1 'diviseur
NP = R(t)
MOT = 3
PRINT #1, "X", SENS, NP, MOT
INPUT #1, R
PRINT "taille dent "; t; "sur "; d
dent: Input " Tapez s pour dent la suivante ";R$
IF R$ = "s" THEN GOTO suit
IF R$ = "S" THEN GOTO suit
goto dent
suit:
NEXT t
PRINT "taillage termine"
PRINT
CLOSE
'nouvelle passe:
INPUT "Nouvelle passe ? O/N "; P$
PRINT
IF P$ = "o" THEN GOTO npasse
IF P$ = "O" THEN GOTO npasse
END
npasse:
print
INPUT " On continue O/N "; P$
PRINT
IF P$ = "o" THEN GOTO taille
IF P$ = "O" THEN GOTO taille
END
@+
JC.