OK, what exactly does this "->" operator accomplish? My book says it is a "structure pointer operator", which might as well say it was a Left Handed Metric 1" Macedonian Rubber-headed Fiddle Wrench and I'd still be none the wiser. --Lawrence ----- Original Message ----- From: "michael brown" To: Sent: Tuesday, February 26, 2002 7:14 PM Subject: Re: [pic]:struct+pointer > ----- Original Message ----- > From: "Also-Antal Csaba" > > But if I want change the value of temperature in the struct, with this: > > (*house[index].numb).temperature=temp; > > I get this message: > > varibles.c: 108: Can't generate code for this expression (error) > > Doesn't picc allow you to say: > > house[index]->numb->temperature=temp > > (I think this is correct, but you have a complex setup) > > > This code is work: > > ship1.temperature = 999; > > > > and this not: > > > > cost ship * p; > > p=&ship1; > > (*p).temperature=123; > > the error message is same. > > p->temperature > > > > > Why??? > > > > > > typedef struct { > > char address; > > > > int temperature; > > char adjust; > > char max_alarm; > > char min_alarm; > > signed char tem_cal; > > > > int relhum; > > int pwm; > > char spay_time; > > char spay_dlay; > > char min_hum; > > char max_hum; > > char str_time; > > char stp_time; > > signed char rh_cal; > > > > int light; > > int optimum; > > int close_time; > > }ship; > > > > typedef struct { > > const ship * numb; > > }blokk; > > > > > > > > static bank3 ship ship1 = 111,210,0,400,40,-123, > > 550,1000,10,100,40,80,81,150,0, 134,300,4000; > > > > etc... > > > > const blokk house[] ={ & ship1, > > & ship2, > > & ship3, > > & ship4, > > & ship5, > > & ship6, > > & ship7, > > & ship8 > > }; > > > > -- > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads