Debian Codegraph @

examples/prism-psl.html

raw symbols SCIP
1 <h2>Strings</h2>
2 <pre><code># PSL Strings are properly rendered
3 print("Hello, World!");
4
5 # Escaped sequences are highlighted too
6 print("Goodbye \H\H\H\H\H\H\H\HHello, World!\n");
7
8 # Multi-line strings are supported
9 print("multi
10 line");
11 </code></pre>
12
13 <h2>Numbers</h2>
14 <pre><code>a = 1;
15 b = 2.5;
16 c = 0xff;
17 </code></pre>
18
19 <h2>PSL Built-in Functions</h2>
20 <pre><code>p = nthargf(process(".*"), 1, " \t", "\n");
21 lock("test");
22 execute("OS", "pwd");
23 </code></pre>
24
25 <h2>PSL Keywords</h2>
26 <pre><code>foreach entry (["aaa", "bbb", "ccc"]) {
27 if (grep("[bc]", entry)) {
28 last;
29 }
30 }
31 </code></pre>
32
33 <h2>PSL Constants</h2>
34 <pre><code>set("/CLASS/inst/paramA/state", WARN);
35 if (true) {
36 PslDebug = -1;
37 }
38 output = execute("OS", "echo test");
39 if (errno) {
40 print(ALARM." with errno=".errno."\n");
41 }
42 print(trim(output, "\n\r\t ", TRIM_LEADING_AND_TRAILING));
43 </code></pre>