Storing a set of values in Delphi

Posted by Hendriksen123 on Stack Overflow See other posts from Stack Overflow or by Hendriksen123
Published on 2010-04-13T09:16:59Z Indexed on 2010/04/13 10:03 UTC
Read the original article Hit count: 348

Filed under:
|
|
|

I am trying to store a set of values in delphi, but i want to be able to address them using their name, instead of an assigned number.

For example, an array of 'OldValues' would let me do

OldValue[1] := InflationEdit.Text;

Ideally however, i would like to have a value stored in 'Data.Inflation.OldValue' for example. For each identifier, such as Inflation, there is an OldValue, NewValue and StoredValue. There are about 12 of these identifiers.

Is there some way i could store the values like this? that way i could then do something like:

Data.Inflation.NewValue := Data.Inflation.OldValue;
Data.Inflation.NewValue := InflationEdit.Text;

© Stack Overflow or respective owner

Related posts about delphi

Related posts about delphi-7