Hello and welcome to the golden programming language course in the previous session.
We talk about Eskom function, and in this session we want to talk about the other half empty package
concept.
This kind of function.
The issue, the function and go language is against the input tax, which is given in the standard input
leads from there and distorts the substance of the space is separated values into successive arguments
as determined by the formats.
Just like this fancy language, very format is Spitfire is mentioned.
And then the address of the variable where the input value is to be restored is kind of Ingo Lang scans
text read from standard input and its those in the arguments as per the specified format.
Moreover, this function is defined under the empty package.
Here, you'll 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.
Format type is the extreme, this is the different formats which are used for each given elements and
a T that interface, these parameters receive each given elements and returns value.
It returns the number of items successfully scanned.
Now let's go to this school program to illustrate the uses of this kind of function.
First, declare some variables by different data types.
For the example for defining that name, SED is string type, and for age that's a sit ins.
And for March, that March float 32.
And has it been accepted or not?
We said that is accept and time for it is ball.
Now, calling it scan the function for scanning and reading the input takes even in this this the input
for this word first pass vesting format or conversion characters of selected value of it and set the
value of it before passed a variable as arguments.
So we use ampersand symbol before each value to form two dots.
Scan F for the example, for set value from input, their standard to name variable.
We write first person s means Issing format for the name variable because it is a string per cent s
and then CET variable will ampersand symbol and person name.
And do these for other variables go to the next line f m t the scan f
person D and Ampersand H conversion character for each EAS percent d, and if empty dot scan f percent
f and set ampersand mark
f m t dot scan f first sent T and ampersand is exit
now printing the given text F.A. dot print f
percent s person the person F and person T and set these variable for these conversion character name
h mark.
And is accept, reformat the court, save the project and execute the program first into desired values
like Gene for nine and twenty four age and eighteen point fifty four mark in total for these exit and
interview.
Now we can see the output, so we were able to get the variable value from using Iskandar function from
the standard input and print them in order not to prolong the time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.