home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zephyr.ens.tek.com!psgrain!qiclab!leonard
- From: leonard@qiclab.scn.rain.com (Leonard Erickson)
- Newsgroups: comp.lang.pascal
- Subject: Re: I need help with copying "records"
- Message-ID: <1992Sep8.192159.11819@qiclab.scn.rain.com>
- Date: 8 Sep 92 19:21:59 GMT
- References: <1992Sep07.162555.5226@crash>
- Reply-To: 70465.203@compuserve.com
- Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
- Lines: 26
-
- tech@crash.cts.com (Don Bontemps) writes:
-
- >type
- > temp = record
- > name : string[10];
- > date : string[4];
- > pass : string[4];
- > end;
- >var
- > data : array[1..100] of temp;
-
-
- >Now if I wanted to copy data[1] to data [2], could I just say
- >data[2] := data[1] or would I have to do it this way
- >data[2].name := data[1].name and so on and so forth. Your help
-
- Data[2] := data[1]; will work just fine. Heck, I initialize
- an array of moderately complicated records by creating a
- temp var of the approriate type, initializing *it*, then doing
- a simple
- for ctr := 1 to max_array do array[ctr] := temp;
- --
- Leonard Erickson leonard@qiclab.scn.rain.com
- CIS: [70465,203] 70465.203@compuserve.com
- FIDO: 1:105/51 Leonard.Erickson@f51.n105.z1.fidonet.org
- (The CIS & Fido addresses are preferred)
-