Jump to content

Records and TStringLists?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
SirStorm25

SirStorm25

    Newbie

  • Members
  • Pip
  • 9 posts
Hi All!

How do I use Arrays with records? When I do the following:
[COLOR="Blue"]type
  aRecord = record
    arry: Array[0..9] of string[255];
  end;

var
  R: aRecord;
  F: File of aRecord;
  A: Array[0..9] of string[255];
begin
  A[0]:= 'Hello World!';
  R.Arry:= A;
  Assign(F, 'OutFile.dat');
  ReWrite(F);
  Write(F, R);
  Close(F);
end; [/COLOR]
However, it returns "Incompatible Types"???

Hope you can help!
Regards

Matt.

Edited by WingedPanther, 03 December 2008 - 08:26 AM.
add code tags (the # button)


#2
jakefrog

jakefrog

    Newbie

  • Members
  • PipPip
  • 11 posts
You should make like

R.Arry[0]:= A[0];

:D