J'ai besoin d'un petit rafraichissement
Comment récupère-t-on un tableau d'une procédure à une autre ?
Je n'arrive pas à synthaxer "array" comme il faut.
Merci
Global x = 2, y = 5
Procedure Tab()
Dim MonTab (5,5)
For j = 0 To y
For i = 0 To x
MonTab (i,j) = count
count+1
Next i
Next j
;;; test
For j = 0 To y
For i = 0 To x
Debug "i "+Str(i)+ " / j"+Str(j) + " " +MonTab(i,j)
Next i
Next j
EndProcedure
Procedure Retry ()
; Je veux mon résultat aussi accessible ici
For j = 0 To y
For i = 0 To x
Debug "i "+Str(i)+ " / j"+Str(j) + " " +MonTab(i,j)
Next i
Next j
EndProcedure
; La ça fonctionne
tab()
; La non
Retry()
Procedure Tab()
Global Dim MonTab (5,5)
For j = 0 To y
For i = 0 To x
MonTab (i,j) = count
count+1
Next i
Next j
;;; test
For j = 0 To y
For i = 0 To x
Debug "i "+Str(i)+ " / j"+Str(j) + " " +MonTab(i,j)
Next i
Next j
EndProcedure
[\code-pb]
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Bonjour Ar-s, ça arrive à n'importe qui de fatiguer, c'est très excusable.
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Global x = 2, y = 5
Procedure Tab(Array ttab(2)); Attention, ici le tableau comporte 2 dimensions
Debug "Taille de la dimension 1 :"
Debug ArraySize(ttab(), 1)
Debug "Taille de la dimension 2 :"
Debug ArraySize(ttab(), 2)
Debug "****************************"
For j = 0 To y
For i = 0 To x
ttab (i,j) = count
count+1
Next i
Next j
;;; test
For j = 0 To y
For i = 0 To x
Debug "i "+Str(i)+ " / j"+Str(j) + " " +ttab(i,j)
Next i
Next j
EndProcedure
Procedure Retry (Array ttab(2)); Attention, ici le tableau comporte 2 dimensions
; Je veux mon résultat aussi accessible ici
For j = 0 To y
For i = 0 To x
Debug "i "+Str(i)+ " / j"+Str(j) + " " +ttab(i,j)
Next i
Next j
EndProcedure
Dim tabtab(x,y)
; Là ça fonctionne
tab(tabtab())
Debug "===================="
; Là aussi
Retry(tabtab())