home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / pascal / 6850 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  1.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!rutgers!psuvax1!psuvm!f0o
  2. From: F0O@psuvm.psu.edu
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: TPW TCollection
  5. Message-ID: <92328.152730F0O@psuvm.psu.edu>
  6. Date: 23 Nov 92 20:27:29 GMT
  7. References: <1992Nov19.081727.18386@usage.csd.unsw.OZ.AU>
  8. Organization: Penn State University
  9. Lines: 34
  10.  
  11. In article <1992Nov19.081727.18386@usage.csd.unsw.OZ.AU>,
  12. p2018756@cumulus.csd.unsw.OZ.AU (Yagna Pant) says:
  13.  
  14. >I am a newcomer to Turbo Pascal for Windows programming and
  15. >would be grateful if you could give me a hint on storing
  16. >a record using TCollection.
  17.  
  18. >Suppose if I have a record:
  19.  
  20. >     PClientInformation = ^TClientInformation;
  21. >     ClientInformation = record
  22. >       Name: array[0..50] of Char;
  23. >       Phone: PChar;
  24. >       RegistrationNo: Integer;
  25. >     end;
  26.  
  27. >How can I store this record using TCollection Object.
  28. >TPW manual doesn't treat this topic in detail.
  29.  
  30. >Thanks in advance.
  31.  
  32. >Yagna Pant
  33.  
  34.    I would simply make the following changes to your code:
  35.  
  36. Old code:
  37.   ClientInformation = record
  38.  
  39. New code:
  40.   ClientInformation = object(TObject)
  41.  
  42.    Now you can store your client information into the collection.
  43.  
  44.                                                           [Tim]
  45.