[fpc-devel] C style operator doesn't work with properties in 2.3.1
    Micha Nelissen 
    micha at neli.hopto.org
       
    Thu Jul 17 09:05:44 CEST 2008
    
    
  
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:
tempRow := FDayList[itm.WeekDayNum].Rows[itm.Timeslot];
tempRow.AvailableSlots := tempRow.AvailableSlots + itm.CountSlots;
Assuming .Rows[X] results in a class instance.
Micha
    
    
More information about the fpc-devel
mailing list