Keywords are the reserved words in Julia which have a predefined meaning to the compiler. These keywords are used to reduce the number of lines in code. Keywords in Julia can’t be used as variable names.
'function' keyword is used to create user-defined functions in Julia. These functions are reusable codes that can be called from anywhere in the code with the name assigned to the function.
function function_name Statement Statement end
'end' keyword is used to mark the ending of a function. Everything between the function keyword and end keyword is considered to be the body of the function.
this is a function
Creating Functions with arguments
Functions in Julia also accept arguments. These functions are also created in the same way by using the
function function_name(argument1, argument2, ...) statement statement end
- Julia end Keyword | Marking end of blocks in Julia
- Julia continue Keyword | Continue iterating to next value of a loop in Julia
- Julia break Keyword | Exiting from a loop in Julia
- Julia local Keyword | Creating a local variable in Julia
- Julia global Keyword | Creating a global variable in Julia
- Fruitful Functions and Void Functions in Julia
- if keyword - Conditional evaluation in Julia
- Julia return keyword
- try keyword - Handling Errors in Julia
- else keyword in Julia
- Functions in Julia
- Pure Functions and Modifiers in Julia
- Julia | checkindex() function with examples
- Julia | checkbounds() function with examples
- Convert an Integer to a String in Julia - string() Function
- Broadcasting a function over collections in Julia - broadcast() and broadcast!() Methods
- Different uses of sine function in Julia - sinpi() and sinc() Method
- Different uses of cosine function in Julia - cospi() and cosc() Method
- Date() function in Julia with Examples
- Getting ceiling value of x in Julia - ceil() Method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.