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
» PANORAMIC V 1
Instruction ignorée dans une boucle for... Emptypar papydall Aujourd'hui à 13:49

» Gestion d'un système client-serveur.
Instruction ignorée dans une boucle for... Emptypar Klaus Aujourd'hui à 11:18

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
Instruction ignorée dans une boucle for... Emptypar Froggy One Aujourd'hui à 9:16

» @Jack
Instruction ignorée dans une boucle for... Emptypar Jack Mar 30 Avr 2024 - 18:40

» trop de fichiers en cours
Instruction ignorée dans une boucle for... Emptypar papydall Lun 29 Avr 2024 - 21:39

» Une calculatrice en une ligne de programme
Instruction ignorée dans une boucle for... Emptypar jean_debord Dim 28 Avr 2024 - 6:47

» Form(résolu)
Instruction ignorée dans une boucle for... Emptypar leclode Sam 27 Avr 2024 - 15:59

» Bataille navale SM
Instruction ignorée dans une boucle for... Emptypar jjn4 Ven 26 Avr 2024 - 15:39

» Les maths du crocodile
Instruction ignorée dans une boucle for... Emptypar jean_debord Jeu 25 Avr 2024 - 8:37

» Naissance de Crocodile Basic
Instruction ignorée dans une boucle for... Emptypar jean_debord Jeu 25 Avr 2024 - 6:45

» Dessine-moi une galaxie
Instruction ignorée dans une boucle for... Emptypar jjn4 Lun 22 Avr 2024 - 11:47

» Erreur END_SUB
Instruction ignorée dans une boucle for... Emptypar jjn4 Lun 22 Avr 2024 - 11:43

» Bug sur DIM_LOCAL ?
Instruction ignorée dans une boucle for... Emptypar papydall Dim 21 Avr 2024 - 21:30

» 2D_fill_color(résolu)
Instruction ignorée dans une boucle for... Emptypar leclode Sam 20 Avr 2024 - 6:32

» Consommation gaz électricité
Instruction ignorée dans une boucle for... Emptypar leclode Mer 17 Avr 2024 - 9:07

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier
Le Deal du moment :
Réassort du coffret Pokémon 151 ...
Voir le deal

 

 Instruction ignorée dans une boucle for...

Aller en bas 
2 participants
AuteurMessage
Yannick




Nombre de messages : 8610
Age : 53
Localisation : Bretagne
Date d'inscription : 15/02/2010

Instruction ignorée dans une boucle for... Empty
MessageSujet: Instruction ignorée dans une boucle for...   Instruction ignorée dans une boucle for... EmptyDim 10 Mar 2013 - 16:43

J'assiste à un truc bizarre.
J'ai une instruction if...end_if dans une boucle for...next.
Cette instruction est ignorée... scratch

Je mets là mon source, la librairie et le fichier d'aide en son état d'avancement.
Les deux premier sont *.bas le troisième *.pdc , le tout dans le même dossier.

Le problème se situe sur les lignes 243 à 252 du source principal (j'y ai laissé les message de verif) :
Code:
Application_Title "Panoramic Data Création"

Constantes()
Variables()
Events()
Interface()
Init()

End

' Déclaration des constantes____________________________________________________
Sub Constantes()
  Dim Dos$ : Dos$=Dir_Current$
Dim KGF$ :KGF$=Dos$+"\KGF.dll"
End_Sub

' Déclaration des variables globales____________________________________________
Sub Variables()
  Dim Clic% , Change% ,Mode%, F_Out$
End_Sub

' Déclaration des évènements____________________________________________________
Sub Events()
  Label Clic,Change,Close_100
End_Sub

' Mise en place de l'interface utilisateur______________________________________
Sub Interface()
  O_Form(0,0,1,0,0,465,595,"Panoramic Data Création"):font_name 0,"arial"
  O_Main_Menu(1,0)
  O_Sub_Menu(2,1,"Fichier",0,1)
  O_Sub_Menu(3,2,"Ouvrir",1,1):O_Sub_Menu(4,2,"Enregistrer",1,1):O_Sub_Menu(5,2,"Quitter",1,1)
  O_Sub_Menu(6,1,"Convertir",1,0)
  O_Sub_Menu(7,1,"A Propos...",1,1)
  O_Sub_Menu(8,1,"?",1,1)
 
  O_Picture(9,0,0,5,5,378,567,""):color 9,0,0,0
  O_Memo(10,0,0,5,5,378,567):Bar_Both 10

  O_Statut_Bar2(11,0,1)
  O_progress_Bar(12,0,0,387,420,0,100)
  O_Alpha(13,0,0,387,10,0,0,""):color 13,250,235,235:font_color 13,0,0,255
End_Sub

' Initialisations de base_______________________________________________________
Sub Init()
  Dim_local Aide$
  Aide$=dir_current$+"\Aide.pdc"
  O_DList(14,Aide$)
End_Sub

' Menu des évènements clics_____________________________________________________
Clic:
  Clic%=Number_Click
  Select Clic%
  Case 3 :Ouvrir():Active 6
  Case 4 :Enregistrer()
  Case 5 :Quitter()
  Case 6 :Convertir()
  Case 7 :APp()
  Case 8 :Aide()
  Case 204: execute a$
  Case 301: Affich_Aide()
  End_Select
Return

' Menu des évènements change____________________________________________________
Change:
  Change%=Number_Change
  Select Change%
  End_Select
Return

' Evènement on_close____________________________________________________________
Close_100:
  top 0,(screen_y-465)/2
  HIDE 12 :POSITION 12,0
  hide 13
return

' Menu Ouvrir
Sub Ouvrir()
  if object_exists(100)=1:if show(100)=1:hide 100:End_If:End_If
  if show(12)=1 then hide 12
  Position 12,0 :caption 13,""
  O_Open_Dialog(0,"*.txt,*.bas,*.jpg,*.bmp|*.txt;*.bas;*.jpg;*.bmp",5)
  if File$ <> ""
      if right$(File$,3)="txt" or right$(File$,3)="bas"
        Hide 9 : Show 10 :clear 10 :Mode%=1
        File_Load 10,File$
'        ici j'en profite pour définir le nom de sortie du fichier
'        je rajoute "_txt.bas" pour memo le fichier contient du texte
        F_Out$=file_extract_name$(File$)
        F_Out$=Left$(F_Out$,len(F_Out$)-4)+"_txt.bas"
      Else
        Hide 10 : Show 9 :Mode%=2
        Get_Size(File$)
        Appercu(File$,L%,H%,9)
'        ici j'en profite pour définir le nom de sortie du fichier
'        je rajoute "_img.bas" pour memo le fichier contient une image
        F_Out$=file_extract_name$(File$)
        F_Out$=Left$(F_Out$,len(F_Out$)-4)+"_img.bas"
      End_If
  End_If
End_Sub

Sub Get_Size(a$)
  Dim_Local res%
  if variable("L%")=0 then Dim L%
  if variable("H%")=0 then Dim H%
  if variable("f$")=0 then Dim f$
  f$=a$
  dll_on KGF$
  res%=dll_call3("AnalyzeImageFile",adr(f$),adr(L%),adr(H%))
  if res%=1
      message "Extension de fichier invalide !"
  end_if
  dll_off
End_Sub

Sub Appercu(I$,L%,H%,No%)
  Dim_Local x%,y%,z
  x%=L% :y%=H% :z=1
  if x%>y%
      while x%>567 or y%>378
        z=z-0.01
        x%=x%*z
        y%=y%*z
      end_while
  else
      while y%>378 or x%>567
        z=z-0.01
        x%=x%*z
        y%=y%*z
      end_while
  end_if
  width No%,x% : height No%,y%
  File_load No%,I$ : Stretch_On No%
End_Sub

' Menu Enregistrer______________________________________________________________
Sub Enregistrer()

End_Sub

' Menu Quitter__________________________________________________________________
Sub Quitter()
  Terminate
End_Sub

' Menu Convertir________________________________________________________________
Sub Convertir()
  Dim_local x%
  If hide(12)=1 : Show 12 :End_If
  if Mode%=1 : x%=count(10) :End_If
  if Mode%=2 : x%=L%*H%    :End_If
  top 0,((screen_y-465)/2)-100
  If Object_Exists(100)=0
      O_Form(100,0,1,top(0)+height(0),left(0),200,595,"Data Preview"):font_name 100,"arial":color 100,250,235,235
      O_Memo(101,100,1,0,0,130,578):Bar_Both 101:font_size 101,8
  Else
      Clear 101:Show 100
  End_If
  Show 13 :caption 13,"Convertion en cours..."
  Min 12,0:Max 12,x%
  position 12,0
  On_close 100,Close_100
  If Mode%=1 then Ecriture_Text()
  If Mode%=2 then Ecriture_Image()
End_Sub

Sub Ecriture_Text()
  Dim_Local x%,a$,nom$
  nom$=file_extract_name$(File$)
  item_add 101,"data"+chr$(32)+chr$(34)+nom$+chr$(34)
  for x%=1 to count(10)
      a$=item_read$(10,x%)
      a$="Data"+chr$(32)+chr$(34)+a$+chr$(34)
      item_add 101,a$
      position 12,x%
  next x%
  caption 13,"Convertion terminée !"
End_Sub

Sub Ecriture_Image()
  Dim_Local nom$,x%,y%,R1%,G1%,B1%,cpt%
  nom$=file_extract_name$(File$)
  nom$=LEFT$(nom$,len(nom$)-3)+"bmp"
  item_add 101,"Data "+chr$(34)+nom$+chr$(34)+","+str$(H%)+","+str$(L%)
      for x%=0 to L% -1
        for y%= 0 to H% -1
            cpt%=cpt%+1
            R1% =color_pixel_red(9,x%,y%)
            G1% =color_pixel_green(9,x%,y%)
            B1% =color_pixel_blue(9,x%,y%)
            item_add 101,"data "+str$(R1%)+","+str$(G1%)+","+str$(B1%)
            position 12,cpt%
            Display
        next y%
      next x%
      caption 13,"Convertion terminée !"
End_Sub

' Menu A Propos_________________________________________________________________
Sub APp()
  Dim_local a$
  If Object_Exists(200)=0
      O_Form(200,0,1,0,0,200,400,"A Propos..."):font_name 200,"Arial"
      O_Alpha(201,200,1,10,160,0,0,"Créé avec :")
      O_Alpha(202,200,1,30,140,0,0,"Panoramic")
      font_bold 202 :font_size 202,16:font_color 202,0,0,255
      O_Alpha(203,200,1,55,155,0,0,"Vs 0.9.24.i10")
      font_italic 203:font_color 203,90,90,90
      a$="http://panoramic-language.pagesperso-orange.fr/index.html"
      O_Alpha(204,200,1,80,50,0,0,a$)
      font_color 204,100,0,255 :cursor_point 204:On_Click 204,Clic
      O_Alpha(205,200,1,100,180,0,0,"Par :")
      O_Alpha(206,200,1,120,150,0,0,"y.geronimi")
      font_size 206,12:font_color 206,0,0,255
  Else
      Show 200
  End_If
End_Sub

' Menu AIde_____________________________________________________________________
Sub Aide()
  If Object_Exists(300)=0
      O_Form(300,0,1,0,0,250,450,"Aide"):font_name 300,"arial"
      O_List(301,300,1,0,0,212,150,""):cursor_point 301:On_Click 301,Clic
      O_Memo(302,300,1,0,150,212,284)
      item_add 301,"Ouvrir":item_add 301,"Enregistrer":item_add 301,"Quitter":item_add 301,"Convertir"
  Else
      Show 300
  End_If
End_Sub

Sub Affich_Aide()
  Dim_local a$,b$,x%,y%,z%,debut%,fin%
  clear 302
  a$=item_index$(301)
  if count(14)>0
 
  for x%=1 to count(14)
      b$=item_read$(14,x%)
      b$=right$(b$,len(b$)-1)
      message a$+" - "+b$
      if b$=a$
        message "ok"
        debut% = x%+1
        exit_for
      end_if
  next x%

  for z%=debut% to count(14)
      if left$(item_read$(14,z%),1)="#"
        fin%=z%-1
        exit_for
      else
        fin%=count(14)
      end_if
  next z%


  if debut%<fin% or debut%=fin%
      for y%=debut% to fin%
        item_add 302,item_read$(14,y%)
      next y%
  end_if

  end_if
End_Sub

' Includes______________________________________________________________________
#include "Objet_Lib.bas"
Code:
' Objet FORM____________________________________________________________________
Sub O_Form(No%,P%,V%,T%,L%,H%,W%,C$)
  if No%> 0 then FORM No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 : Top No%,T% : Else : Top No%,(Screen_y-H%)/2 : End_If
  If L% > 0 : Left No%,L%: Else : Left No%,(Screen_x-W%)/2: End_If
  if C$<>"" then Caption No%,C$
End_Sub
' Objet ALPHA___________________________________________________________________
Sub O_Alpha(No%,P%,V%,T%,L%,H%,W%,C$)
  ALPHA No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
End_Sub
' Objet EDIT____________________________________________________________________
Sub O_Edit(No%,P%,V%,T%,L%,H%,W%)
  EDIT No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet BUTTON__________________________________________________________________
Sub O_Button(No%,P%,V%,T%,L%,H%,W%,C$,Cl%)
  BUTTON No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
  if Cl%> 0 then on_click No%,Clic
  cursor_point No%
End_Sub
' Objet GRID____________________________________________________________________
Sub O_Grid(No%,P%,V%,T%,L%,H%,W%)
  GRID No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet CONTAINER_______________________________________________________________
Sub O_Container(No%,P%,V%,T%,L%,H%,W%,C$)
  CONTAINER No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
End_Sub
' Objet SCENE3D_________________________________________________________________
Sub O_Scene3D(No%,P%,V%,T%,L%,H%,W%)
  SCENE3D No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%

End_Sub
' Objet MEMO____________________________________________________________________
Sub O_Memo(No%,P%,V%,T%,L%,H%,W%)
  MEMO No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet COMBO___________________________________________________________________
Sub O_Combo(No%,P%,V%,T%,L%,H%,W%)
  COMBO No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet LIST____________________________________________________________________
Sub O_List(No%,P%,V%,T%,L%,H%,W%,F$)
  LIST No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if F$<>""
  if file_exists F$ then file_load No%,F$
  end_if
End_Sub
' Objet PICTURE_________________________________________________________________
Sub O_Picture(No%,P%,V%,T%,L%,H%,W%,P$)
  PICTURE No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if P$<>"" then File_load No%,P$
End_Sub
' Objet CHECK___________________________________________________________________
Sub O_Check(No%,P%,V%,T%,L%,H%,W%,C$)
  CHECK No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
End_Sub
' Objet OPTION__________________________________________________________________
Sub O_Option(No%,P%,V%,T%,L%,H%,W%,C$)
  OPTION No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
End_Sub
' Objet MAIN_MENU_______________________________________________________________
Sub O_Main_Menu(No%,P%)
  MAIN_MENU No%
  if P% > 0 then Parent No%,P%
End_Sub
' Objet SUB_MENU________________________________________________________________
Sub O_Sub_Menu(No%,P%,C$,Cl%,A%)
  SUB_MENU No%
  if P% > 0 then Parent No%,P%
  if C$<>"" then Caption No%,C$
  If Cl%=1 then on_click No%,Clic
  If A%=0 then inactive No%
End_Sub
' Objet SOUND___________________________________________________________________
Sub O_Sound(No%,P%,S$)
  SOUND No%
  If P%>0 then Parent No%,P%
  If S$<>"" then file_load No%,S$
End_Sub
' Objet MOVIE___________________________________________________________________
Sub O_Movie(No%,P%,V%,T%,L%,H%,W%,M$)
  MOVIE No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if M$<>"" then file_load No%,M$
End_Sub
' Objet TRACK_BAR_______________________________________________________________
Sub O_Track_Bar(No%,P%,V%,T%,L%,H%,W%)
  TRACK_BAR No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet OPEN_DIALOG_____________________________________________________________
Sub O_Open_Dialog(Out%,Filtre$,O%)
  dim_local No%,F$
  No%=Number_objects+1
  OPEN_DIALOG No%
  if filtre$<>"" then Filter No%,Filtre$
  F$=File_name$(No%)
  if variable("File$")=0:Dim File$:End_If
  if F$<>"_"
      if O%=1 then text out%,F$
      if O%=2 then Caption Out%,F$
      if O%=3 then item_add Out%,F$
      if O%=4 then file_load Out%,F$
      if O%=5 then File$=F$
  end_if
  Delete No%
End_Sub
' Objet SAVE_DIALOG_____________________________________________________________
' Sub O_Save_Dialog(Filtre$)
'  dim_local No%,F$
'  No%=Number_objects+1
'  SAVE_DIALOG No%
'  if filtre$<>"" then Filter No%,Filtre$
'  F$=file_name$(No%)
' End_Sub
' Objet SCROLL_BAR______________________________________________________________
Sub O_Scroll_Bar(No%,P%,V%,T%,L%,H%,W%)
  SCROLL_BAR No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet PROGRESS_BAR____________________________________________________________
Sub O_Progress_Bar(No%,P%,V%,T%,L%,H%,W%)
  PROGRESS_BAR No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet SPIN____________________________________________________________________
Sub O_Spin(No%,P%,V%,T%,L%,H%,W%)
  SPIN No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet DLIST___________________________________________________________________
Sub O_Dlist(No%,F$)
  DLIST No%
  if F$<>"" then file_load No%,F$
End_Sub
' Objet SCENE2D_________________________________________________________________
Sub O_Scene2D(No%,P%,V%,T%,L%,H%,W%)
  SCENE2D No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
End_Sub
' Objet TIMER___________________________________________________________________
Sub O_Timer(No%,OO%,Inter%,OT%,T$)
  TIMER No%
  if OO%=1 then timer_on No%
  if OO%=0 then timer_off No%
  if inter%>0 then timer_interval No%,inter%
  if OT%=1
      if T$<>""
        On_timer No%,T$
      end_if
  end_if
End_Sub
' Objet CONTAINER_OPTION________________________________________________________
Sub O_Container_Option(No%,P%,V%,T%,L%,H%,W%,C$)
  CONTAINER_OPTION No%
  if P% > 0 then Parent No%,P%
  If V% = 0 Then hide No%
  If H% > 0 Then Height No%,H%
  If W% > 0 Then Width No%,W%
  If T% > 0 Then Top No%,T%
  If L% > 0 Then Left No%,L%
  if C$<>"" then Caption No%,C$
End_Sub
' Objet IMAGE___________________________________________________________________
Sub O_Image(No%,I$)
  if I$<>"" then file_load No%,I$
End_Sub
' Objet Statut_Bar______________________________________________________________
Sub O_Statut_Bar(P%,R%,G%,B%,R1%,G1%,B1%,T$)
  Dim_local No%,x%,a%
  No%=Number_Objects+1
  For x%=1 To Number_Objects :If Object_Type(x%)=13 :a%=1:End_If:Next x%
  If a%=0
      O_Picture(No%,P%,1,Height(P%)-58,0,20,Width(P%)-16,"")
      O_Alpha(No%+1,0,1,Height(P%)-55,10,0,0,T$)
  Else
      O_Picture(No%,P%,1,Height(P%)-78,0,20,Width(P%)-16,"")
      O_Alpha(No%+1,0,1,Height(P%)-75,10,0,0,T$)
  End_If
  Color No%,R%,G%,B% :2d_target_is No% :2d_pen_color R1%,G1%,B1%
  For x%=1 to Width(P%)-16:2d_point x%,0 :Next x%
  Color No%+1,R%,G%,B%:font_name No%+1,"Arial":Font_color No%+1,0,0,255
  if Variable("OSB%")=0 then Dim OSB%
  OSB%=No%+1
End_Sub
' Objet Statut_Bar2_____________________________________________________________
Sub O_Statut_Bar2(No%,P%,V%)
  Dim_Local No2% ,x% ,a% ,Pa%
  No%=Number_Objects+1 :Pa%=P% :No2%=No%
  for x%=1 to Number_Objects:If Object_Type(x%)=13 :a%=1:End_If:Next x%
  If a%=0
      O_Picture(No2%,P%,V%,Height(P%)-61,0,23,width(0)-16,"")
  Else
      O_Picture(No2%,P%,V%,Height(P%)-81,0,23,width(0)-16,"")
  End_If
'  je crée une variable globale et je lui affecte le numéro de l'objet simulé
'  dans le cas où il me prendrait l'envie de cacher cet objet
  If Variable("OSB2%")=0 then Dim OSB2%
  OSB2%=No2%
  Adaptation_OSB(No2%,Pa%)
End_Sub

Sub Adaptation_OSB(No%,P%)
  Dim_Local x% ,y% ,z% ,t$ ,R_osb% ,G_osb% ,B_osb%
  color No%,235,235,239 : y%=width(P%)-27
  Restore
  while t$<>"OSB_Corps.bmp" :read t$:End_while
  Read R_osb% :Read G_osb% :Read B_osb%
  2d_target_is No% : 2d_pen_color R_osb%,G_osb%,B_osb%
  for x%=0 to y% :2d_point x%,z% :next x%
  Restore
  while t$<>"OSB_Fin.bmp" :read t$:End_while
  for x%=y% to y%+10
      for z%=0 to 22
        Read R_osb% :Read G_osb% :Read B_osb%
        2d_target_is No% : 2d_pen_color R_osb%,G_osb%,B_osb%
        2d_point x%,z%
      next z%
  next x%
End_Sub
' Data du Statut_Bar2___________________________________________________________
Data "OSB_Corps.bmp"
data 170,165,162
data "OSB_Fin.bmp"
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 170,165,162
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 170,165,162
data 170,165,162
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 239,235,235
data 239,235,235
data 242,239,239
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 170,165,162
data 239,235,235
data 242,239,239
data 170,165,162
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 170,165,162
data 170,165,162
data 242,239,239
data 170,165,162
data 170,165,162
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 239,235,235
data 239,235,235
data 242,239,239
data 239,235,235
data 239,235,235
data 242,239,239
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 170,165,162
data 239,235,235
data 242,239,239
data 170,165,162
data 239,235,235
data 242,239,239
data 170,165,162
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 242,239,239
data 170,165,162
data 170,165,162
data 242,239,239
data 170,165,162
data 170,165,162
data 242,239,239
data 170,165,162
data 170,165,162
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 170,165,162
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
data 239,235,235
Code:
#Ouvrir
  Menu Ouvrir :
#Enregistrer
  Menu Enregistrer :
#Quitter
  Menu Quitter :
#Convertir
  Menu Convertir :
PS : Nécessite KGF.dll
Revenir en haut Aller en bas
Yannick




Nombre de messages : 8610
Age : 53
Localisation : Bretagne
Date d'inscription : 15/02/2010

Instruction ignorée dans une boucle for... Empty
MessageSujet: re   Instruction ignorée dans une boucle for... EmptyDim 10 Mar 2013 - 16:59

De ce que je vois, a$ n'est pas égal à b$ dans le cas où je clique sur le list 301 sur l'item "-Quitter".

Donc "-Quitter" n'est pas égal à "-Quitter" scratch
Revenir en haut Aller en bas
Yannick




Nombre de messages : 8610
Age : 53
Localisation : Bretagne
Date d'inscription : 15/02/2010

Instruction ignorée dans une boucle for... Empty
MessageSujet: re   Instruction ignorée dans une boucle for... EmptyDim 10 Mar 2013 - 17:16

Grrrrrr!!!!!!

voilà, pour tous ceux qui ont peur de publier, l'exemple d'un sujet bidon.
l' horreur...heu...l' erreur vient d'un espace qui s'est glissé dans le fichier d'aide *.pdc.

j'ai rajouté un trim$() à la ligne 246 et tout est rentré dans l'ordre

ligne 246 : b$=trim$(item_read$(14,x%))

alors...toujours peur de publier.... Laughing

PS : Il m'a tout de même fallu 1 heure pour trouver cette bêtise... Embarassed
Revenir en haut Aller en bas
bignono

bignono


Nombre de messages : 1127
Age : 66
Localisation : Val de Marne
Date d'inscription : 13/11/2011

Instruction ignorée dans une boucle for... Empty
MessageSujet: Re: Instruction ignorée dans une boucle for...   Instruction ignorée dans une boucle for... EmptyDim 10 Mar 2013 - 17:27

Bonjour Ygeronimi Smile
Moi, je ne comprend pas trop ton truc? confused
Mais moi, ce que j'ai vu, c'est que les lignes 246 et 247 doivent être inversés, ce qui donne dans ta boucle:
Code:
  for x%=1 to count(14)
      b$=item_read$(14,x%)
      b$=right$(b$,len(b$)-1)
      if b$=a$
      message a$+" - "+b$
        message "ok"
        debut% = x%+1
        exit_for
      end_if
  next x%
A+ Wink Wink Wink
Revenir en haut Aller en bas
Yannick




Nombre de messages : 8610
Age : 53
Localisation : Bretagne
Date d'inscription : 15/02/2010

Instruction ignorée dans une boucle for... Empty
MessageSujet: re   Instruction ignorée dans une boucle for... EmptyLun 11 Mar 2013 - 13:10

@ bignono

en fait j'avais une comparaison entre le string cliqué dans le list 301 et les lignes de mon fichier d'aide
en cas d'égalité, les lignes suivantes du fichier sont chargées dans le memo 302 jusqu'à la marque suivante.

sauf qu'un espace s'était glissé dans le fichier d'aide du coup lors de la lecture de ce fichier

if a$=b$ devenait if "Quitter"="Quitter " et donc l'instruction était fausse... Laughing

Tout est rentré dans l'ordre et je t'invite à tester ce petit utilitaire...
...il est sur mon webdav : Panoramic_Data_Création.zip
Revenir en haut Aller en bas
Contenu sponsorisé





Instruction ignorée dans une boucle for... Empty
MessageSujet: Re: Instruction ignorée dans une boucle for...   Instruction ignorée dans une boucle for... Empty

Revenir en haut Aller en bas
 
Instruction ignorée dans une boucle for...
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» bug FNC : pb d'évaluation dans une boucle
» scene2D et boucle
» souris et coordonnées
» probleme de variable type tableau dans une boucle
» Erreur 44:Boucle FOR / NEXT

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: A l'aide!-
Sauter vers: