Hello and welcome to the Golang programming language course.
In the previous session, we talked about print function and indecision.
We want to talk about the others if empty package concept.
Print and function.
The print and function in go language formats, using the default formats for its utterance and rise
to a standard output, print and function works the same as print function, except that is Apple's
new line at the end of the improved history.
And so whatever the output is, in the end, the cursor will move to the next line.
Also, in case any variables are added to the input stream, then this function will ensure that the
variables are separated by space in between.
Here, the spaces are always added between operations, and a new line is appended at the end.
Moreover, dysfunction is defined under the empty package.
Here you need to import this empty package in order to use this function.
Now you can see the syntax a tree that interface that contains some strings, including a specified
constant variable and return value.
It returns the number of bytes written and in write or encounter.
Let's go to the school program to illustrate the uses of print and function.
First, declaring some extreme variables that name and value equals glue and programming
language.
Now, concrete information, if A. Don't change a set variable name and add this string value like is
a and the itinerary variable a large value.
Now let's define some other variables for the example that number one, number two, number three and
No.
Four and initialize these variables.
Five, 10, 15 and 15 now cutting print and function again and display plus and multiplication of these
variables go to the next line.
If you don't print and set number one plus sit known to sit equals, sit No.
Three and go to the next line.
F.A. Dot print and set number one multiplication number two and set equals and set number four.
OK, reformat the code, save the project and execute the program.
Now we can see the output in the first quote.
It can be seen that the function print is not containing any space within the specified extremes.
Still in output is print space and in the second code it can be seen that the function and is not using
any new line that cost less and is still in the output.
It prints new line in order not to prolong the time of decision to be finished.
And we will continue the content in the next session.
Goodbye.