Hello and welcome to the goal and putting it on language course in the previous session, we talked
about it in function and indecision.
We want to talk about the other half empty package concept.
This can function.
The scan function in Go language scans, the input texts, which is given in the standard input reads
from there, and it stores the success of the space separated values into successive arguements.
Values that are separated by a space or new lines are key to those multiple values.
There are also multiple arguments.
Moreover, this function is defined under the empty package here.
You'll need to import this empty package in order to use these functions.
Now you can see the syntax here.
A tree interface receives each type of the given text.
In return, it returns the number of items successfully scanned.
Now let's go to a school program to illustrate the uses of this scan function.
First, declare some variables by different data types, for the example, for defined name Vash, name
this range and for age their age end and for March that March float 32.
And has it been accepted or not?
There is an.
Pool now conning your skin function for scanning and reading the input takes given in the standard input
BoyleSports before past the variable as we use ampersand symbol for the example for CET value from input
a standard name.
So we write, if empty lots can enter some name
and do these for other variables, go to the next line F.A. Dot, Scan, Sit and age and 50 Dot Scan
and March
and F.A. Dot scan and is exit now printing the given ticks if empty dot print.
If a
person is present, the percent F and person T and said the variables name four person s age four percent
be mark four percent F and E's exit four percent t the format.
The call save the project and execute the program.
Now the insert value that full name time change into four age time.
For the example.
Twenty five keynoter for March ninety point fifty and for easy exit sit through and into.
Now we can see the output v we're able to get the variables value from using.
This can function from the standard input and pre-destined.
In order not to prolong the time of decision, we will finish sheet and we will continue the content
in the next session.
Goodbye.