Julia mode
x
1
#numbers
2
1234
3
1234im
4
.234
5
.234im
6
2.23im
7
2.3f3
8
23e2
9
0x234
10
11
#strings
12
'a'
13
"asdf"
14
r"regex"
15
b"bytestring"
16
17
"""
18
multiline string
19
"""
20
21
#identifiers
22
a
23
as123
24
function_name!
25
26
#unicode identifiers
27
# a = x\ddot
28
a⃗ = ẍ
29
# a = v\dot
30
a⃗ = v̇
31
#F\vec = m \cdotp a\vec
32
F⃗ = m·a⃗
33
34
#literal identifier multiples
35
3x
36
4[1, 2, 3]
37
38
#dicts and indexing
39
x=[1, 2, 3]
40
x[end-1]
41
x={"julia"=>"language of technical computing"}
42
43
44
#exception handling
45
try
46
f()
47
catch
48
"Error"
49
finally
50
g()
51
end
52
53
#types
54
immutable Color{T<:Number}
55
r::T
56
g::T
57
b::T
58
end
59
60
#functions
61
function change!(x::Vector{Float64})
62
for i = 1:length(x)
63
x[i] *= 2
64
end
65
end
66
67
#function invocation
68
f('b', (2, 3)...)
69
70
#operators
71
|=
72
&=
73
^=
74
\-
75
%=
76
*=
77
+=
78
-=
79
<=
80
>=
81
!=
82
==
83
%
84
*
85
+
86
-
87
<
88
>
89
!
90
=
91
|
92
&
93
^
94
\
95
?
96
~
97
:
98
$
99
<:
100
.<
101
.>
102
<<
103
<<=
104
>>
105
>>>>
106
>>=
107
>>>=
108
<<=
109
<<<=
110
.<=
111
.>=
112
.==
113
->
114
//
115
in
116
...
117
//
118
:=
119
.//=
120
.*=
121
./=
122
.^=
123
.%=
124
.+=
125
.-=
126
\=
127
\\=
128
||
129
===
130
&&
131
|=
132
.|=
133
<:
134
>:
135
|>
136
<|
137
::
138
x ? y : z
139
140
#macros
141
2 1+1
142
:x) (
143
144
#keywords and operators
145
if else elseif while for
146
begin let end do
147
try catch finally return break continue
148
global local const
149
export import importall using
150
function macro module baremodule
151
type immutable quote
152
true false enumerate
153
154
155
MIME types defined: text/x-julia
.