2 Purpose: To show the use of the dot operator
3 Dr. Purdum, Aug. 25, 2012
12 } myServicePeople, yourServicePeople;
13 struct servicePeople SetPhoneNumber(struct servicePeople temp); // New
16 Serial.print("myServicePeople lvalue: ");
17 Serial.print((int) &myServicePeople);
18 Serial.print(" yourServicePeople lvalue: ");
19 Serial.println((int) &yourServicePeople);
20 yourServicePeople.ID = 205;
21 Serial.print("myServicePeople.ID rvalue: ");
22 Serial.print(myServicePeople.ID);
23 Serial.print(" yourServicePeople.ID rvalue: ");
24 Serial.println(yourServicePeople.ID);
25 myServicePeople = SetPhoneNumber(yourServicePeople); // Changed
26 Serial.println("After assignment:");
27 Serial.print("myServicePeople.ID rvalue: ");
28 Serial.print(myServicePeople.ID);
29 Serial.print(" yourServicePeople.ID rvalue: ");
30 Serial.println(yourServicePeople.ID);
31 Serial.print("A servicePerson structure takes ");
32 Serial.print(sizeof(servicePeople));
33 Serial.println(" bytes of storage.");
34 Serial.print("myServicePeople.Phone rvalue: "); // New
35 Serial.print(myServicePeople.Phone); // New
40 // All lines below are new
41 struct servicePeople SetPhoneNumber(struct servicePeople temp)