-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move function basics to separate file
- Loading branch information
1 parent
f04a87e
commit 95f1cd2
Showing
2 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Function basics | ||
|
||
!!! info "Function declaration:" | ||
So far, we did not show how to define functions. However, the above example should show the basic syntax for defining functions. The `return` keyword specifies the function output. In this case, the function returns nothing since we only want to compare numbers. If we need to define a function that returns more than one variable, the following syntax is used. | ||
|
||
```julia | ||
return x, y, z | ||
``` | ||
|
||
Here `x`, `y`, and `z` are some variables. We will discuss the function declaration in more detail in the [next lesson](@ref Functions). |