wide/static/js/lib/codemirror-4.10/mode/idl/index.html

65 lines
1.6 KiB
HTML
Raw Normal View History

2014-08-18 17:45:43 +04:00
<!doctype html>
2014-11-30 05:24:24 +03:00
<title>CodeMirror: IDL mode</title>
2014-08-18 17:45:43 +04:00
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
2014-11-30 05:24:24 +03:00
<script src="idl.js"></script>
2014-08-18 17:45:43 +04:00
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
2014-10-27 10:49:58 +03:00
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
2014-08-18 17:45:43 +04:00
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
2014-10-27 10:49:58 +03:00
<li><a href="https://github.com/codemirror/codemirror">Code</a>
2014-08-18 17:45:43 +04:00
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
2014-11-30 05:24:24 +03:00
<li><a class=active href="#">IDL</a>
2014-08-18 17:45:43 +04:00
</ul>
</div>
<article>
2014-11-30 05:24:24 +03:00
<h2>IDL mode</h2>
2014-08-18 17:45:43 +04:00
<div><textarea id="code" name="code">
2014-11-30 05:24:24 +03:00
;; Example IDL code
FUNCTION mean_and_stddev,array
;; This program reads in an array of numbers
;; and returns a structure containing the
;; average and standard deviation
2014-08-18 17:45:43 +04:00
2014-11-30 05:24:24 +03:00
ave = 0.0
count = 0.0
2014-08-18 17:45:43 +04:00
2014-11-30 05:24:24 +03:00
for i=0,N_ELEMENTS(array)-1 do begin
ave = ave + array[i]
count = count + 1
endfor
ave = ave/count
2014-08-18 17:45:43 +04:00
2014-11-30 05:24:24 +03:00
std = stddev(array)
2014-08-18 17:45:43 +04:00
2014-11-30 05:24:24 +03:00
return, {average:ave,std:std}
END
2014-08-18 17:45:43 +04:00
</textarea></div>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
2014-11-30 05:24:24 +03:00
mode: {name: "idl",
version: 1,
2014-08-18 17:45:43 +04:00
singleLineStringErrors: false},
lineNumbers: true,
indentUnit: 4,
matchBrackets: true
});
</script>
2014-11-30 05:24:24 +03:00
<p><strong>MIME types defined:</strong> <code>text/x-idl</code>.</p>
2014-08-18 17:45:43 +04:00
</article>