Enregister des Tableaux dans un fichier (PLEAAAAASE !!!!)

Hollow02 - 20 sept. 2001 à 18:20
 schouly - 21 sept. 2001 à 12:22
Slt,
Voici mon problème:

J'ai dans mon application 4 tableaux de type

tableau1(2,50)
tableau2(2,50)
...

J'aimerais les sauvegarder dans un SEUL fichier puis pouvoir récupérer ces tableaux en faisant ouvrir.

(Me contacter par e-mail pour + de détails)

Merci

1 réponse

pour enregistrer :

open app.path & "\Fichier.txt" for outpur as #1
for i = 0 to 50
   print#1, tableau1(0,i) ; tableau1(1,i) ; tableau1(2,i)
   print#1, 'la même chose avec ton tableau 2
   print#1, ...
   print#1,...
next
close #1


pour ouvrir
open app.path & ... for input as #1
for i = 0 to 50
   for j = 1 to 4
      input#1,a,b,c
      select case j
         case 1
            tableau1(0,i) = a
            tableau1(1,i) = b
            tableau1(2,i) = c
         case 2
            tableau2(0,i) = a
            tableau2(1,i) = b
            tableau2(2,i) = c
         case 3
      ...
         case 4
      end select
   next
next
close #1

je crois que ça doit mùarcher ... ici je n'ai aucun moyen de tester ...
0
Rejoignez-nous