[fpc-pascal]OOP for dummies...

James_Wilson at i2.com James_Wilson at i2.com
Wed Jun 13 15:10:14 CEST 2001

Sorry for the large post. And my apologies if this is a simple question,
but it sure stumps me.

The following is for Win32 and Go32 on a machine running Win2K Pro and FPC

I'm attempting, for the first time, to use object oriented programming.
Yes, I'm ashamed to admit it, but it's true. Up until recently I never
thought I needed OOP, but the more I read about it the more I think that
perhaps I might benefit from it. And speaking of reading... before anyone
asks, yes I've read the docs on classes and objects -- a few times actually
-- but I can't seem to grasp all the concepts, so I'm going to post this in
hopes someone can point me in the right direction.

I'm trying to create my own dynamic array. Well, it's actually more like a
dynamic array of records (I know dynamic arrays are coming in the next
version of the compiler, but this is something I've been struggling with
for a while so I want to see if I can solve my problem now). Basically, I
want to be able to read a file into memory and have it stop only when I run
out of memory and not when I've reached the limit of my array (array
[1..whatever] of ^ToRecordType).

My research indicates that a class called TCollection has the possibility
of doing what I want, but I can't figure out exactly how to do it. The
attached examples programs both compile but do virtually nothing. One uses
objects, the other classes. If someone has a few moments I would really
appreciate it they could take a look and see what I'm doing wrong.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: OOP.zip
Type: application/zip
Size: 2329 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20010613/9a6b3f5c/attachment.zip>

More information about the fpc-pascal mailing list