1 00:00:12,890 --> 00:00:16,400 Hello and welcome to the Golang programming language course. 2 00:00:16,880 --> 00:00:23,480 In the previous session, we talked about if print function and in this session we want to talk about 3 00:00:23,480 --> 00:00:25,640 the other half empty package concept. 4 00:00:29,740 --> 00:00:31,660 If print function. 5 00:00:34,080 --> 00:00:41,280 The plaintiff function in good language formats, according to a format, is specify it and rise to 6 00:00:41,280 --> 00:00:42,840 a i o dance writer. 7 00:00:43,440 --> 00:00:49,850 Moreover, this function is defined under the empty package, just similar to if premium. 8 00:00:49,860 --> 00:00:57,540 But one difference that drives the line between the two is that if a form is according to the specified 9 00:00:57,540 --> 00:01:01,590 format, that does not form according to the defined format. 10 00:01:01,980 --> 00:01:08,940 If print, if then writes the format of the pedestrian into defined using here, you'll need to import 11 00:01:08,940 --> 00:01:12,150 this empty package in order to use this function. 12 00:01:12,750 --> 00:01:17,100 Now you can see the syntax parameters. 13 00:01:17,400 --> 00:01:21,600 This function accepts three parameters which are illustrated below. 14 00:01:22,080 --> 00:01:25,260 First, W type is by the writer. 15 00:01:25,530 --> 00:01:30,870 This is the specifying the standard input or output format string. 16 00:01:31,230 --> 00:01:36,780 This is containing some strings, including verbs and a T-Dog interface. 17 00:01:36,960 --> 00:01:42,880 This is the specified constant variables used in the code and return value. 18 00:01:42,930 --> 00:01:47,310 It retains the number of by 310 and any rider or encountered. 19 00:01:47,790 --> 00:01:53,580 Now let's go to this school curriculum to illustrate the usage of f print f function. 20 00:01:55,900 --> 00:02:02,110 First, define some variables like that, no one, no. 21 00:02:02,110 --> 00:02:03,610 Two and No. 22 00:02:03,850 --> 00:02:09,550 Three and initialize then by values five, 10 and 15. 23 00:02:11,350 --> 00:02:21,430 Now calling if print a function which returns no as the nominal by 310 and error or as any error encountered. 24 00:02:22,150 --> 00:02:30,670 So differential barrier to like number and you are calling equals from this empty package. 25 00:02:30,880 --> 00:02:33,700 The involved f print function. 26 00:02:35,150 --> 00:02:44,330 Said Barry, the first started out as I all writer from the this package, we select a study out. 27 00:02:46,340 --> 00:02:55,250 And select variables for the exam per person, the plus person equals personality. 28 00:02:56,780 --> 00:03:01,970 Got back his list and said that it is for peace, commerce and characters. 29 00:03:02,330 --> 00:03:04,280 No one, No. 30 00:03:04,310 --> 00:03:05,780 Two and No. 31 00:03:06,140 --> 00:03:06,500 Three. 32 00:03:09,020 --> 00:03:16,690 Now printing the number of by 310 empty dot print and No. 33 00:03:20,360 --> 00:03:21,830 Why it's 34 00:03:26,150 --> 00:03:29,240 leading the pack is air. 35 00:03:30,800 --> 00:03:36,500 And printing, if any, raw encountered F.A. thoughts, prints. 36 00:03:37,430 --> 00:03:43,850 E. R. Kelly, formerly called Save the Project and Execute the program. 37 00:03:47,390 --> 00:03:55,070 Now we can see the output five plus 10 equals 15 and 13 bytes written and no roll. 38 00:03:55,280 --> 00:04:02,240 First, we create a variable and using the printing function to form is according to a format specified. 39 00:04:02,630 --> 00:04:07,880 Then we assign the return value inside to variants like number and error. 40 00:04:07,910 --> 00:04:12,110 And finally, we print the number of bytes written as no variable. 41 00:04:12,380 --> 00:04:18,770 And if there is an error, we will display it as a roll variable in order not to prolong the time of 42 00:04:18,770 --> 00:04:19,310 decision. 43 00:04:19,340 --> 00:04:23,180 We will finish sheet and we will continue the content in the next session. 44 00:04:23,240 --> 00:04:23,780 Goodbye.