1 00:00:13,080 --> 00:00:18,060 Hello and welcome to the golden programming language course in the previous session. 2 00:00:18,090 --> 00:00:24,480 We talk about Eskom function, and in this session we want to talk about the other half empty package 3 00:00:24,480 --> 00:00:25,110 concept. 4 00:00:30,530 --> 00:00:31,820 This kind of function. 5 00:00:34,800 --> 00:00:41,760 The issue, the function and go language is against the input tax, which is given in the standard input 6 00:00:41,970 --> 00:00:48,240 leads from there and distorts the substance of the space is separated values into successive arguments 7 00:00:48,450 --> 00:00:50,310 as determined by the formats. 8 00:00:51,210 --> 00:00:56,530 Just like this fancy language, very format is Spitfire is mentioned. 9 00:00:56,790 --> 00:01:04,290 And then the address of the variable where the input value is to be restored is kind of Ingo Lang scans 10 00:01:04,290 --> 00:01:10,830 text read from standard input and its those in the arguments as per the specified format. 11 00:01:11,340 --> 00:01:15,210 Moreover, this function is defined under the empty package. 12 00:01:15,540 --> 00:01:20,130 Here, you'll need to import this empty package in order to use this function. 13 00:01:21,810 --> 00:01:25,440 Now you can see the syntax parameters. 14 00:01:25,920 --> 00:01:30,120 This function access to parameters which are illustrated below. 15 00:01:31,300 --> 00:01:38,260 Format type is the extreme, this is the different formats which are used for each given elements and 16 00:01:38,260 --> 00:01:45,160 a T that interface, these parameters receive each given elements and returns value. 17 00:01:45,340 --> 00:01:48,640 It returns the number of items successfully scanned. 18 00:01:49,600 --> 00:01:55,210 Now let's go to this school program to illustrate the uses of this kind of function. 19 00:01:57,130 --> 00:02:00,520 First, declare some variables by different data types. 20 00:02:00,790 --> 00:02:14,260 For the example for defining that name, SED is string type, and for age that's a sit ins. 21 00:02:15,340 --> 00:02:22,390 And for March, that March float 32. 22 00:02:22,390 --> 00:02:25,840 And has it been accepted or not? 23 00:02:26,200 --> 00:02:33,970 We said that is accept and time for it is ball. 24 00:02:37,370 --> 00:02:43,220 Now, calling it scan the function for scanning and reading the input takes even in this this the input 25 00:02:43,820 --> 00:02:51,230 for this word first pass vesting format or conversion characters of selected value of it and set the 26 00:02:51,230 --> 00:02:54,460 value of it before passed a variable as arguments. 27 00:02:54,460 --> 00:03:00,130 So we use ampersand symbol before each value to form two dots. 28 00:03:00,130 --> 00:03:07,040 Scan F for the example, for set value from input, their standard to name variable. 29 00:03:07,280 --> 00:03:15,500 We write first person s means Issing format for the name variable because it is a string per cent s 30 00:03:15,800 --> 00:03:22,040 and then CET variable will ampersand symbol and person name. 31 00:03:23,360 --> 00:03:29,960 And do these for other variables go to the next line f m t the scan f 32 00:03:32,630 --> 00:03:49,790 person D and Ampersand H conversion character for each EAS percent d, and if empty dot scan f percent 33 00:03:49,790 --> 00:03:53,810 f and set ampersand mark 34 00:03:56,780 --> 00:04:06,860 f m t dot scan f first sent T and ampersand is exit 35 00:04:09,470 --> 00:04:13,910 now printing the given text F.A. dot print f 36 00:04:16,910 --> 00:04:27,980 percent s person the person F and person T and set these variable for these conversion character name 37 00:04:29,950 --> 00:04:33,590 h mark. 38 00:04:35,220 --> 00:04:45,390 And is accept, reformat the court, save the project and execute the program first into desired values 39 00:04:45,750 --> 00:04:58,620 like Gene for nine and twenty four age and eighteen point fifty four mark in total for these exit and 40 00:04:58,620 --> 00:04:59,070 interview. 41 00:05:00,090 --> 00:05:08,250 Now we can see the output, so we were able to get the variable value from using Iskandar function from 42 00:05:08,250 --> 00:05:14,100 the standard input and print them in order not to prolong the time of decision. 43 00:05:14,250 --> 00:05:18,030 We will finish it and we will continue the content in the next session. 44 00:05:18,240 --> 00:05:18,750 Goodbye.