Hello and welcome to the goal and programming language course in this session.
We want to talk about the fonctions concept.
Functions and go land.
A function is a group of statements that exist within the program for the purpose of performing a specific
task and return or reason to the caller, a function can also perform some specific tasks without returning
anything.
Every GO program has at least one function, which is mean you can divide your code into separate functions.
How you divide your code among different functions is up to you.
But logically, the division should be such that each function performs a specific task.
Functions can make your application modular.
Go Lang supports functions that goes beyond our library, provides no built in functions that your program
can con.
For example, the function LEN takes arguements of various types and returns the length of the time.
Function declaration.
A declaration begins with the foreign keyboard, followed by the name you want the function to have
it paid off parenthesis and then a block containing the functions code.
The declaration of the functions contains font function name.
Parameters.
Return tide.
Function by the.
Found that it is sourced the declaration of the function function name.
It's the actual name of the function, the function name and the time list released together constitute
the function signature.
Parameters, a parameter is like a placeholder, then the function is invoked.
You pass a value to the parameter.
This value is referred to as actual parameter or argument.
The parameter least refers to the time, order and number of the parameters of the function.
Parameters are optional.
That is, the function may contain no parameters.
Return type If function may return a list of values, the return times is the least of data times of
the values the function returns.
Some functions perform the desired operations without returning a value function body.
It contains a collection of statements that define what the function does.
Points to remember.
And they must begin with the letter and can have any number of additional letters and numbers.
A functioning cannot start with a no.
A function named cannot contain spaces if the functions with the names that are solved with an uppercase
letter will be exported to other packages.
If the function name is sourced with a lowercase letter, it won't be exported to other packages, but
you can call this function within the same package.
If a name consists of multiple wars, each war after the first should be capitalized like this display
name and print entries, and et cetera.
Function names are case sensitive.
For example, print pained by the first uppercase and print by the old letters of her case are three
different variables in order not to prolong the time of decision.
You will finish sheet and we will continue the content in the next session.
Goodbye.