Or Add a Method to the target object. (as long as it is part of your
code base, or can be modified by you)
and then do
FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlotsInc(itm.CountSlots);
In the class that defines
property AvailableSlot;
you can add
procedure AvailableSlotsInc(n : Integer);
Same for include, exclude, and all the others.
Best Regards
Martin
Jonas Maebe wrote:
On 17 Jul 2008, at 08:41, Graeme Geldenhuys wrote:
Simple one liners like the following:
inc(FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlots,
itm.CountSlots);
or
FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlots +=
itm.CountSlots;
now has to change to this ugly line...
FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlots :=
FDayList[itm.WeekDayNum].Rows[itm.Timeslot].AvailableSlots +
itm.CountSlots;
Or
with FDayList[itm.WeekDayNum].Rows[itm.Timeslot] do
AvailableSlots:= AvailableSlots+itm.CountSlots;
Jonas
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel