On Thu, Jul 17, 2008 at 9:05 AM, Micha Nelissen <[EMAIL PROTECTED]> 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: > > tempRow := FDayList[itm.WeekDayNum].Rows[itm.Timeslot]; > tempRow.AvailableSlots := tempRow.AvailableSlots + itm.CountSlots;
And that's what I changed it to, just after I posted my message. :-) Either way, it's still two lines of code compared to one. But, it will do. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel