github.com/elliott5/community@v0.14.1-0.20160709191136-823126fb026a/app/public/codemirror/mode/idl/index.html (about)

     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="idl.js"></script>
    10  <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
    11  <div id=nav>
    12    <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
    13  
    14    <ul>
    15      <li><a href="../../index.html">Home</a>
    16      <li><a href="../../doc/manual.html">Manual</a>
    17      <li><a href="https://github.com/codemirror/codemirror">Code</a>
    18    </ul>
    19    <ul>
    20      <li><a href="../index.html">Language modes</a>
    21      <li><a class=active href="#">IDL</a>
    22    </ul>
    23  </div>
    24  
    25  <article>
    26  <h2>IDL mode</h2>
    27  
    28      <div><textarea id="code" name="code">
    29  ;; Example IDL code
    30  FUNCTION mean_and_stddev,array
    31    ;; This program reads in an array of numbers
    32    ;; and returns a structure containing the
    33    ;; average and standard deviation
    34  
    35    ave = 0.0
    36    count = 0.0
    37  
    38    for i=0,N_ELEMENTS(array)-1 do begin
    39        ave = ave + array[i]
    40        count = count + 1
    41    endfor
    42    
    43    ave = ave/count
    44  
    45    std = stddev(array)  
    46  
    47    return, {average:ave,std:std}
    48  
    49  END
    50  
    51      </textarea></div>
    52      <script>
    53        var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
    54          mode: {name: "idl",
    55                 version: 1,
    56                 singleLineStringErrors: false},
    57          lineNumbers: true,
    58          indentUnit: 4,
    59          matchBrackets: true
    60        });
    61      </script>
    62  
    63      <p><strong>MIME types defined:</strong> <code>text/x-idl</code>.</p>
    64  </article>