comparison .cms/lib/codemirror/mode/idl/index.html @ 0:78edf6b517a0 draft

24.10
author Coffee CMS <info@coffee-cms.ru>
date Fri, 11 Oct 2024 22:40:23 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:78edf6b517a0
1 <!doctype html>
2
3 <title>CodeMirror: IDL mode</title>
4 <meta charset="utf-8"/>
5 <link rel=stylesheet href="../../doc/docs.css">
6
7 <link rel="stylesheet" href="../../lib/codemirror.css">
8 <script src="../../lib/codemirror.js"></script>
9 <script src="../../addon/edit/matchbrackets.js"></script>
10 <script src="idl.js"></script>
11 <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
12 <div id=nav>
13 <a href="https://codemirror.net/5"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
14
15 <ul>
16 <li><a href="../../index.html">Home</a>
17 <li><a href="../../doc/manual.html">Manual</a>
18 <li><a href="https://github.com/codemirror/codemirror5">Code</a>
19 </ul>
20 <ul>
21 <li><a href="../index.html">Language modes</a>
22 <li><a class=active href="#">IDL</a>
23 </ul>
24 </div>
25
26 <article>
27 <h2>IDL mode</h2>
28
29 <div><textarea id="code" name="code">
30 ;; Example IDL code
31 FUNCTION mean_and_stddev,array
32 ;; This program reads in an array of numbers
33 ;; and returns a structure containing the
34 ;; average and standard deviation
35
36 ave = 0.0
37 count = 0.0
38
39 for i=0,N_ELEMENTS(array)-1 do begin
40 ave = ave + array[i]
41 count = count + 1
42 endfor
43
44 ave = ave/count
45
46 std = stddev(array)
47
48 return, {average:ave,std:std}
49
50 END
51
52 </textarea></div>
53 <script>
54 var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
55 mode: {name: "idl",
56 version: 1,
57 singleLineStringErrors: false},
58 lineNumbers: true,
59 indentUnit: 4,
60 matchBrackets: true
61 });
62 </script>
63
64 <p><strong>MIME types defined:</strong> <code>text/x-idl</code>.</p>
65 </article>