-
Notifications
You must be signed in to change notification settings - Fork 0
/
creatingfunctions.html
82 lines (45 loc) · 1.29 KB
/
creatingfunctions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="description" content="JuliaWorkshop.GitHub.io : Website">
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<title>JuliaWorkshop.GitHub.io</title>
</head>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<h1 id="project_title">JuliaWorkshop.GitHub.io</h1>
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<h4>
Writing Functions
</h4>
<font = 4>
Previous Section | Back to <a href="index.html"> Main Page </a> | Next Section
</font>
<h5>Functions with multiple expressions</h5>
The syntax for defining a function with more than one expression is like this:
<pre><code>
function functionname(arg1, arg2)
an expression
another expression
more expressions
the final expression
end
</code></pre>
Here's a typical function that calls two other functions and then ends.
<pre><code>
julia> function breakfast()
maketoast()
brewcoffee()
end
breakfast (generic function with 1 method)
</code></pre>
</body>
</html>