Hello and welcome to the Golang programming language course in the previous sessions, we defined the
variable indigo language through Divine Keyboard and examined its different cases.
And in this session, we will define the variable true, the short variable declaration.
The local variables, which are declared and initialized in the functions, are declared by using shorthand
variable declaration.
In this syntax, the time of the variable is determined by the time of the expression.
Now let's do one example for this case.
First, we define the short variable declaration, for example, that one column equals a hundred in
this case set the type of variable based on the expiration.
This means that the nominal value 100 is stored inside rather than and its type is integer.
So go to the next line and define another variable.
For example, that two column equals and such as string type gold programming.
This means that the text when you go programming is stored inside that data and its type is a string
and go to the next line and define another variable.
Like that, three column equals a hundred and thirty five point ninety four.
This means that the float value a hundred and thirty four point ninety four is stored inside the factory
and its type is float for display, then print variables be used to print the function from this empty
package.
So we write if the value of that one Collins Person D as formatted string, because the time of the
variable one is integer and set that one and go to the next line and display type of the variable.
So we write F if the tide of that one columns per cent t off case because we want to display the type
of the variables so we use from Theodorakis as format history and Cert VI one.
OK, copy these two lines and go to the new line and paste here for displayed another variable.
So we change name and value of this variable VAR tool because the type of string to change that format
is turning into a person as large case and that tool.
And for the very little three
we use from percent, if because the time of the battery is fluid, so we use from person if as commerce
in character or for math is strange and we change the name of the variable into that tree.
OK.
To be able to display its value in the output on new line, we use Beckett's login and then of the comment,
so we pull back, is this end and of each comment?
OK.
Perform at the court, save the project and execute the program.
Now go to Terminal First, go to Project Folder, see the variables killer screened and run the project
by the command go run thought back as such, making that call.
Now we can see the output.
The value of that one is 100 and type of it is int value of that to is go programming and type of it
is string and value of that tree is one hundred and thirty five point ninety four.
And type of it is flawed.
64.
OK.
Most of the local variables are declared and initialized by using shorthand variable declaration due
to their brevity and flexibility in order not to prolong the time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.