Original Post
I have this situation where I would like to run through the fields of my record and set all the integer types to zero. At the moment I am doing the following
type TStock = record
wood : integer;
stone : integer;
grain : integer;
end;
==
stock is type Tstock
==
stock.stone := 0;
stock.grain := 0;
etc
There must be a more elegant way. The stock type is going to increase and there must be a way that I can run through an unknown amount of fields programmatically.
I have tried searching on dejanews but I don''t even know the terminology for what I am trying to achieve so I just run into blind alleys. Can anyone point in me in the right direction with some pointers, code, terminology or URLs where I can get more info?
help is much regarded.