Debian Codegraph @

examples/prism-erlang.html

raw symbols SCIP
1 <h2>Comments</h2>
2 <pre><code>% This is a comment
3 %% coding: utf-8</code></pre>
4
5 <h2>Strings</h2>
6 <pre><code>"foo \"bar\" baz"</code></pre>
7
8 <h2>Numbers</h2>
9 <pre><code>42.
10 $A.
11 $\n.
12 2#101.
13 16#1f.
14 2.3.
15 2.3e3.
16 2.3e-3.</code></pre>
17
18 <h2>Functions</h2>
19 <pre><code>P = spawn(m, loop, []).
20 io:format("I am ~p~n", [self()]).
21 'weird function'().
22 </code></pre>
23
24 <h2>Variables</h2>
25 <pre><code>P = {adam,24,{july,29}}.
26 M1 = #{name=>adam,age=>24,date=>{july,29}}.
27 M2 = maps:update(age,25,M1).
28 io:format("{~p,~p}: ~p~n", [?MODULE,?LINE,X]).</code></pre>
29
30 <h2>Operators</h2>
31 <pre><code>1==1.0.
32 1=:=1.0.
33 1 > a.
34 +1.
35 -1.
36 1+1.
37 4/2.
38 5 div 2.
39 5 rem 2.
40 2#10 band 2#01.
41 2#10 bor 2#01.
42 a + 10.
43 1 bsl (1 bsl 64).
44 not true.
45 true and false.
46 true xor false.
47 true or garbage.</code></pre>