Hello and welcome to the golden programming language course in the previous session, we talk about
if this cannot function and in this session, we want to talk about the other half empty package concept.
If can Ellen function?
The if scan and function in go language is Cairns, the specified takes read from I dot reader and then
the store successive space separated values into successive arguments, if it can learn, is similar
to a first scan.
But if the scan stops scanning at a new line, meaning that the last input character should be followed
by a new line for if this can lead to a stop scanning, it may as well be an end.
The Find No Content, No Eskin.
This function is defined under the empty package here.
You'll need to import the FMO package in order to use this function.
Now you can see the scene techs parameters, this function, except two parameters which are illustrated
below.
Our time is I 00. reader, this parameter contains this can specify text and a three dot interface.
These parameters are accepting each as specified elements and return value.
It returns.
The number of items successfully is scanned.
Now let's go to this school program to illustrate the use age of if scanned Ellen function.
First declaring least of extremes, integers and float value.
Define a variable like text column he calls Robert.
Twenty seven, eighty dot fifty and through now calling new reader function for reading each elements
of the list and then it plays it into a skin barrier.
So define a barrier the light skin color equals from the strength package.
The Invoke the new reader function, new reader.
And Sit takes that argument.
Text.
Now declaring different types of variables than.
The Strange.
That age and that march low thirty two.
And that ease access.
Born.
Now calling if Escandon function first defined to variable like number and URL calling equals from 50
pages, we select, if this can elen function first, said Eskin, as I would not read the arguments
and set variables Ampersand named Anderson Age, Ampersand, Mar and Ampersand is exit
now checking if there is any error.
If E are not equal to mean panic, eruv
now printing the number of items successfully is scanned and each element to F.A. Dot print a
number of elements persons d and person is for name percent, D for age and person, F for mark and
persons.
T four is exact and set variables first number and name, age Mar and said is exit value.
Now reformat the code, save the project and execute the programmed.
Now we can see the output number of elements is four and Robert set for testing variable 27, set for
age variable and 8.50 sit for mark and true value is set for easy exit value that so we were able to
get the variable value from using if Escandon function and preen, then in order not to prolong the
time of decision, we will finish it and we will continue the content in the next session.
Goodbye.