Primo faire un tableau multiple dans une structure de donnée n'est pas aussi simple que ça. Faire comme ceci :
C'est impossible, il faut faire comme suit :
Code : Tout sélectionner
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure >>>>>
Structure Line
Array.b[20]
EndStructure
; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs >>>>>
Procedure SetLineArray(*ObjetA.Line, Index, Array.b)
*ObjetA\Array[Index] = Array
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les observateurs >>>>>
Procedure.b GetLineArray(*ObjetA.Line, Index)
ProcedureReturn *ObjetA\Array[Index]
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Déclaration de la Structure >>>>>
Structure TCAR
TheCar.c
ch.Line[20]
EndStructure
; <<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les mutateurs >>>>>
Procedure SetTCARTheCar(*ObjetA.TCAR, TheCar.c)
*ObjetA\TheCar = TheCar
EndProcedure
Procedure SetTCARCh(*ObjetA.TCAR, Index, *Ch.Line)
CopyMemory(*Ch, *ObjetA\ch[Index], SizeOf(Line))
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Les observateurs >>>>>
Procedure.c GetTCARTheCar(*ObjetA.TCAR)
ProcedureReturn *ObjetA\TheCar
EndProcedure
Procedure GetTCARCh(*ObjetA.TCAR, Index)
ProcedureReturn *ObjetA\ch[Index]
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Le mutateur Spécial >>>>>
ProcedureDLL SetTCARchNumber(*ObjetA.TCAR, LineIndex, RowIndex, Number.f)
SetLineArray(GetTCARCh(*ObjetA, LineIndex), RowIndex, Number)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< L'observateur Spécial >>>>>
ProcedureDLL.f GetTCARchNumber(*ObjetA.TCAR, LineIndex, RowIndex)
ProcedureReturn GetLineArray(GetTCARCh(*ObjetA, LineIndex), RowIndex)
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Dim Alpha.TCAR(96)
For Comteur = 0 To 95
For LineIndex = 0 To 19
For RowIndex = 0 To 19
SetTCARchNumber(Alpha(Compteur), LineIndex, RowIndex, 1)
Next
Next
Next
For Comteur = 0 To 5 ; 95
Debug "Index Tableau (Dim) no. " + Str(Compteur)
For LineIndex = 0 To 5 ; 19
Debug "Ligne Tableau Static no. " + Str(LineIndex)
For RowIndex = 0 To 5 ; 19
Debug "Rangé Tableau Static no. " + Str(RowIndex)
Debug GetTCARchNumber(Alpha(Compteur), LineIndex, RowIndex)
Next
Next
Next
D'accord le code n'est pas très élégant mais ça fonctionne. J'espère que ça peut t'aider.
A+
Guimauve