summaryrefslogtreecommitdiffhomepage
path: root/julia.html.markdown
diff options
context:
space:
mode:
authorDivay Prakash <divayprakash3@gmail.com>2018-11-18 00:49:39 +0530
committerDivay Prakash <divayprakash3@gmail.com>2018-11-18 00:49:39 +0530
commit5286a86efa7113e5386b33d576c27eb1e79d3ba6 (patch)
treeaa2aae99a82adb93a898ebe338662c2034fa842d /julia.html.markdown
parent57ffb5b34df3969399db80866d48cb78ea278501 (diff)
Add push! explanation, closes #2047
Diffstat (limited to 'julia.html.markdown')
-rw-r--r--julia.html.markdown2
1 files changed, 2 insertions, 0 deletions
diff --git a/julia.html.markdown b/julia.html.markdown
index 2fe05c49..69b6aa0c 100644
--- a/julia.html.markdown
+++ b/julia.html.markdown
@@ -163,6 +163,8 @@ matrix = [1 2; 3 4] # => 2×2 Array{Int64,2}: [1 2; 3 4]
b = Int8[4, 5, 6] # => 3-element Array{Int8,1}: [4, 5, 6]
# Add stuff to the end of a list with push! and append!
+# By convention, the exclamation mark '!'' is appended to names of functions
+# that modify their arguments
push!(a, 1) # => [1]
push!(a, 2) # => [1,2]
push!(a, 4) # => [1,2,4]