Autor Beitrag
Larus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 06.03.05 20:17 
Hi... ich will einen Array den wir im www.delphi-forum.de/....php?p=226176#226176 benutzen ( map: array[1..80] of array[1..80] of integer; ) in eine Datei Speichern... auf der Suche im INET bin ich öfters auf das Speichern Dynamischer Arrays gestoßen.... Ich versteh nur net so ganz wie ich das mit diesem Array machen soll... Könntet ihr mir Tipps geben... (muss keine Src sein)??
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: So 06.03.05 20:21 
Dein Array ist ja aber nicht dynamisch. Die dynamischen Arrays machen dir das Leben nicht leichter.
Frage: In welchem Format willst du das ganze gespeichert haben?
Larus Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: So 06.03.05 20:45 
Gegenfrage: In welchen Formaten kann ich es Speichern?
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: So 06.03.05 20:49 
Offenbar ist dir das Format egal, vielleicht probierst du's mal hiermit:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
Var
 F: File;
begin
 AssignFile(F, 'myfile.map');
 rewrite(F, 1);
 BlockWrite(F, map, SizeOf(map));
 closefile(F);
end;

Gruss


Zuletzt bearbeitet von delfiphan am Mi 13.07.05 20:54, insgesamt 1-mal bearbeitet
Larus Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 431



BeitragVerfasst: Mo 07.03.05 18:14 
kk thx versuch ich ma!
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Mi 13.07.05 19:26 
Hi
Und wie kann man es dann wieder laden?
Ich hoffe es macht nichts, wenn ich meine Frage hier reinposte.
chrissivo
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 130

WIN XP, WIN 2000, WIN MCE, WIN 98
D5 Pers
BeitragVerfasst: Mi 13.07.05 19:55 
mit
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
{$I-}
AssignFile(F, 'mytextfile.map');
reset(F);
ShowMessage(IntToStr(IOResult));
read(f, feld);
CloseFile(F);
{$I+}

kannst du das Feld ansprechen. Feld muss aber als Variable deklariert werden!
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Mi 13.07.05 20:44 
Danke! :D