Hello and welcome to the goal and programming language course in the previous session, we talked about
at twists, not type and indecision, we want to talk about the others the strongest concept.
Methods which point to a receiver.
ENCODE language, you're allowed to create a metal with a pointer receiver.
With the hand of the pointer, a receiver, if a change made in the metal will reflect in the corner,
which is not possible with the value receiver, now you can see the scene techs.
Let's go to a school program to illustrate how to create a missile with point to a receiver.
First, create this right name, author Tom.
Also, restaurant celebrations, different fees for this restaurant like name, Estrange and branch.
Typekit is a strong OK now, create the metal with the receiver of Ozer tight as pointer defying fine.
Set a receiver for ulcer tracked as a pointer, a asterisk, also undefined name for this matter.
For the example, it's sure and set a parameter like a branch type is a string.
Go to the caliber of a scythe, a statement for this matter, if you're asked to a dance branch equals
a branch.
In this case, the assigned new branch as a branch in all is Branch Med..
Now go to main function, create an ulcer restaurant and initialize it, then call the receiver method.
Initializing the values of the Old Service Trust, for example, resolved KOLLAN equals ozer name.
Rather and rash.
See this here first, this also his name and his branch names before the chance to go to the next line
p be for changing
FP.
Oh, search me, result that name.
And if he.
Oh, serves.
Rearrange the result.
And branch reform Atletico and save the project now, calling it point to go to the next line, define
a pointer like P Cullen equals and and person results.
Now, calling the show method and dispelling again OSU's name and branch names after the change, he
thought show and set a new branch criteria for the example, see?
And again, these fellow officers and branch name, he copy these lines and paste here.
After changing, reformat the code, save the project and execute the program.
Now we can see the output.
We could define this wrong by two fields, then create a receiver and so and assign it to almost aristocats
pointer.
And in this metal set a new branch by table as a branch, then display author's name and branch names
before the invoke of method receiver and changes, then invokes the receiver mis-sold main function
and display in a game OSU's name and branch name after invoked the receiver method and see the branch
value has changed because we use from receiver method by the pointer items in order not to prolong the
time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.