all repos — NoPaste @ 0c194823849d27c970ad8888f940f407bc7b4c0a

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/idl/index.html (view raw)

 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"><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/codemirror">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
31FUNCTION 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
50END
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>