Hello and welcome to the golden programming language course in the previous session, we talked about
its a function and indecision.
We want to talk about the other FMV package concept.
Is this kind of function?
The scan, a function in Golden Goose, it scans the specified string, and it's towards the successive
space separated values into successive arguements, as determined by the format as this Caniff walks
similar to a scan of exit.
The difference that if this kind of collects input as the argument is string and not the input format,
the consulate screen in mentioned formatting.
Moreover, this function is defined under the empty package.
Here, you'll need to import the empty package in order to use this function.
Now you can see the syntax parameters.
This function accepts three parameters which are illustrated below SDR and type is issuing.
This parameter contains the specified text, which is going to be scanned.
Format type is this string.
This parameter is the different types of format for each element of the specified string and a three
dot interface.
This parameter receives each elements of this string and returns value.
It returns the number of items successfully passed.
Now let's go to this school program to illustrate the usage of its scanner function.
First declaring some variables by different types.
That name is strange.
That age ain't that mark.
Float 32 and there.
Is exit board.
Now, calling the scan the function, which returns the number of elements successfully is scanned and
erode if it persists.
So we defined two variables as return in time for the scan, the function and the sign it to these variables
like number and e are calling equals inward scan if from the FMT package.
Set values like Robert for May 25 for age, seventeen point fifteen for Mark and two for his exit.
And here we assign extreme formatting for each variable as a string, arguing this
person s four main person D for each person, f for mark and per cent T for is accept and pass the variable
as argument.
So we use ampersand symbol B for each variable and name.
Ampersand H and her son Mark and Ampersand is accent
below.
Statements get executed if there is any or if D are not equals need.
Panic and now printing the number of elements and each element also F.A. Dot print, if
no.
Of Elon's person, the display, the numbers, dash person.
It has for name Person D for disability, the age person, if for disability, the March and Person
T for display is accept variable and set variables for these conversion characters.
No.
Name, age, march and is accept OK, reform, and they could save the project and execute the program.
Now we can see the output number of elements is four and values are Roberts four nine two five four
eight seven two Dot fifty four mark and true for ease accept.
So if you're able to get the variable, its value from using Iskandar function and print, 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.