Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Records and TStringLists?

hello world string records

  • Please log in to reply
1 reply to this topic

#1 SirStorm25

SirStorm25

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 30 November 2008 - 06:35 AM

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)

  • 0

#2 jakefrog

jakefrog

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 03 December 2008 - 08:21 AM

You should make like

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

:D
  • 0





Also tagged with one or more of these keywords: hello world, string, records

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download