Hello and welcome to the Golang programming language course in the previous session, we talked about
this kind of function.
And in this session, we want to talk about the other half empty package concept.
S. S. Cannon and function.
The scan and function in Go language scans the specified history and installs the successive best pace
separated values into successive arguments.
This function is tops scanning at the new line and after the final item, there must be a new line or
in the fine.
Moreover, this function is defined under the empty package.
Here you need to import this empty package in order to use this function.
Now you can see the syntax parameters.
This function access to parameters which are illustrated below SDR type, is string.
This parameter contains the specified text, which is going to be scanned and a three dot interface.
This parameter receives each elements of this ring and returns value.
It returns the number of items successfully a scan.
Now let's go to this school program to illustrate the use age of Escandon function.
First peak learning some valuable, despite the different times, for the example that named a strange
and their age and now calling SS Ken Ellen function from the FMO package first defined two variables
like No, and you are calling records from FMC Package B in both s Escandon function and set value.
Robert.
And thirty four h and said variables, Andrew name and emphasized age.
Checking if the function returns any role, if you are not equals to Neil.
Panic?
No.
Now printing the number of elements present in the specified history and also the elements.
So if you don't print if.
Number of elements,
personality and name, first and S
and H.
First and D and set variables number four, number of element and name for dispelling the name and age
variable for display the age value refoulement, they could see the prosaic and excused you.
Now we can see the output number of elements is to name is Robert, and age is 30.
OK?
We were able to get the variables value from using Escandon function and print in in order not to prolong
the time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.