I assume this is simple enough, when you know how :)

I retrieve 2 files, pricelist with multiple information such as number, price, desciption and so on,
the 2. file is discount file, with 2 fields : discountcode;discount like G30;48
which means discountcode = G30 which equals 48%

I have a program to read the pricefile, but in order to get the right discount without having to build the exact codes into the program, I would like to read the discount from file perhaps into table/records and then determine for each number what the discount should be, also I would like to exit the discount reading when the right code i hit, since the priceprogram have to read around 120.000 numbers.

So I seek a solution and maybe a simple "How to"


5 Years
Discussion Span
Last Post by John B.

Could you give a little example, I never really learned Delphi just trying to adapt my Pascal to Delphi.

The discountfile is CSV, so it's easy to replace ; with = but then I'm lost.

The ideal would have been something like
case discount of :
easy to handle and jump out when found, to minimize time in loop.
Sorry if I'm too newbee :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.