FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Form(résolu)
[RÉSOLU] FOR NEXT STEP Emptypar leclode Aujourd'hui à 17:59

» trop de fichiers en cours
[RÉSOLU] FOR NEXT STEP Emptypar Marc Aujourd'hui à 11:42

» Bataille navale SM
[RÉSOLU] FOR NEXT STEP Emptypar jjn4 Hier à 17:39

» Une calculatrice en une ligne de programme
[RÉSOLU] FOR NEXT STEP Emptypar jean_debord Hier à 8:01

» Gestion d'un système client-serveur.
[RÉSOLU] FOR NEXT STEP Emptypar Pedro Jeu 25 Avr 2024 - 19:31

» Les maths du crocodile
[RÉSOLU] FOR NEXT STEP Emptypar jean_debord Jeu 25 Avr 2024 - 10:37

» Naissance de Crocodile Basic
[RÉSOLU] FOR NEXT STEP Emptypar jean_debord Jeu 25 Avr 2024 - 8:45

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
[RÉSOLU] FOR NEXT STEP Emptypar Froggy One Mer 24 Avr 2024 - 18:38

» Dessine-moi une galaxie
[RÉSOLU] FOR NEXT STEP Emptypar jjn4 Lun 22 Avr 2024 - 13:47

» Erreur END_SUB
[RÉSOLU] FOR NEXT STEP Emptypar jjn4 Lun 22 Avr 2024 - 13:43

» Bug sur DIM_LOCAL ?
[RÉSOLU] FOR NEXT STEP Emptypar papydall Dim 21 Avr 2024 - 23:30

» 2D_fill_color(résolu)
[RÉSOLU] FOR NEXT STEP Emptypar leclode Sam 20 Avr 2024 - 8:32

» Consommation gaz électricité
[RÉSOLU] FOR NEXT STEP Emptypar leclode Mer 17 Avr 2024 - 11:07

» on_key_down (résolu)
[RÉSOLU] FOR NEXT STEP Emptypar leclode Mar 16 Avr 2024 - 11:01

» Sous-programme(résolu)
[RÉSOLU] FOR NEXT STEP Emptypar jjn4 Jeu 4 Avr 2024 - 14:42

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Avril 2024
LunMarMerJeuVenSamDim
1234567
891011121314
15161718192021
22232425262728
2930     
CalendrierCalendrier
Le Deal du moment : -29%
PC portable – MEDION 15,6″ FHD Intel i7 ...
Voir le deal
499.99 €

 

 [RÉSOLU] FOR NEXT STEP

Aller en bas 
4 participants
AuteurMessage
Fredisland




Nombre de messages : 261
Date d'inscription : 30/03/2018

[RÉSOLU] FOR NEXT STEP Empty
MessageSujet: [RÉSOLU] FOR NEXT STEP   [RÉSOLU] FOR NEXT STEP EmptyLun 16 Avr 2018 - 17:31

Bonjour,

J'ai remarqué que la boucle FOR NEXT ne peut qu'être incrémentée de 1 à chaque passage.

Pourquoi ne pas instaurer un STEP pour choisir le pas de progression :

FOR N = 1 TO 20 STEP 5
FOR N = 20 TO 1 STEP -1
FOR N = 1 TO 5 STEP .25

En attendant, j'ai du mal à me défaire de la facilité d'une boucle à incrément négatif.


Dernière édition par Fredisland le Lun 16 Avr 2018 - 18:05, édité 1 fois
Revenir en haut Aller en bas
Jean Claude

Jean Claude


Nombre de messages : 5948
Age : 69
Localisation : 83 Var
Date d'inscription : 07/05/2009

[RÉSOLU] FOR NEXT STEP Empty
MessageSujet: Re: [RÉSOLU] FOR NEXT STEP   [RÉSOLU] FOR NEXT STEP EmptyLun 16 Avr 2018 - 17:36

Bonjour Fredisland,

STEP¨existe et il fait ce tu décris, dans ton message.

A+
Revenir en haut Aller en bas
Jicehel

Jicehel


Nombre de messages : 5947
Age : 51
Localisation : 77500
Date d'inscription : 18/04/2011

[RÉSOLU] FOR NEXT STEP Empty
MessageSujet: Re: [RÉSOLU] FOR NEXT STEP   [RÉSOLU] FOR NEXT STEP EmptyLun 16 Avr 2018 - 17:38

Exactement, j'ai été pris de court par jean-Claude pendant que je cherchais l'extrait de la doc:

Documentation a écrit:
FOR variable = Expression1 TO Expression2

Groupe d'Instructions

NEXT variable

Exécute "Groupe d'Instructions" pour Variable variant de la valeur Expression1 à la valeur Expression2.

Un STEP est disponible pour la boucle FOR / NEXT: il définit l'incrément de la variable.

Une commande EXIT_FOR permet de sortir de la boucle FOR / NEXT.

Tu peux incrémenter d'une valeur décimale ou négative (tu as des tas d'exemples dans les fonctions de tracés de courbes par exemple)
Revenir en haut Aller en bas
Jean Claude

Jean Claude


Nombre de messages : 5948
Age : 69
Localisation : 83 Var
Date d'inscription : 07/05/2009

[RÉSOLU] FOR NEXT STEP Empty
MessageSujet: Re: [RÉSOLU] FOR NEXT STEP   [RÉSOLU] FOR NEXT STEP EmptyLun 16 Avr 2018 - 17:40

Bonjour Jicehel,

Ta réponse est bien plus complète que la mienne.

A+
Revenir en haut Aller en bas
papydall

papydall


Nombre de messages : 6996
Age : 73
Localisation : Moknine (Tunisie) Entre la chaise et le clavier
Date d'inscription : 03/03/2012

[RÉSOLU] FOR NEXT STEP Empty
MessageSujet: Re: [RÉSOLU] FOR NEXT STEP   [RÉSOLU] FOR NEXT STEP EmptyLun 16 Avr 2018 - 17:42

Code:

dim i
for i = 10 to 50 step 5
    print i
next i
print
for i = 50 to 10 step -5
    print i
next i
print
for i = 1 to 2 step 0.125
    print i
next i

Revenir en haut Aller en bas
http://papydall-panoramic.forumarabia.com/
Fredisland




Nombre de messages : 261
Date d'inscription : 30/03/2018

[RÉSOLU] FOR NEXT STEP Empty
MessageSujet: Re: [RÉSOLU] FOR NEXT STEP   [RÉSOLU] FOR NEXT STEP EmptyLun 16 Avr 2018 - 17:49

Ah mince, c'est que j'ai eu une erreur sur mes boucles, probablement une erreur de ma part.
Bon bah merci à tout le monde pour votre réponse rapide... Et désolé pour le dérangement
Revenir en haut Aller en bas
Contenu sponsorisé





[RÉSOLU] FOR NEXT STEP Empty
MessageSujet: Re: [RÉSOLU] FOR NEXT STEP   [RÉSOLU] FOR NEXT STEP Empty

Revenir en haut Aller en bas
 
[RÉSOLU] FOR NEXT STEP
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Pour une coche "résolu" RESOLU
» step ?
» step et steps
» FONT_COLOR_BACKGROUNG N,R,G,B [RESOLU]
» À TAB !!!

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos souhaits d'amélioration de Panoramic-
Sauter vers: