scripts/CodeMirror/mode/octave/index.html (view raw)
1<!doctype html>
2
3<title>CodeMirror: Octave 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="octave.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="#">Octave</a>
23 </ul>
24</div>
25
26<article>
27<h2>Octave mode</h2>
28
29 <div><textarea id="code" name="code">
30%numbers
31[1234 1234i 1234j]
32[.234 .234j 2.23i]
33[23e2 12E1j 123D-4 0x234]
34
35%strings
36'asda''a'
37"asda""a"
38
39%identifiers
40a + as123 - __asd__
41
42%operators
43-
44+
45=
46==
47>
48<
49>=
50<=
51&
52~
53...
54break zeros default margin round ones rand
55ceil floor size clear zeros eye mean std cov
56error eval function
57abs acos atan asin cos cosh exp log prod sum
58log10 max min sign sin sinh sqrt tan reshape
59return
60case switch
61else elseif end if otherwise
62do for while
63try catch
64classdef properties events methods
65global persistent
66
67%one line comment
68%{ multi
69line comment %}
70
71 </textarea></div>
72 <script>
73 var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
74 mode: {name: "octave",
75 version: 2,
76 singleLineStringErrors: false},
77 lineNumbers: true,
78 indentUnit: 4,
79 matchBrackets: true
80 });
81 </script>
82
83 <p><strong>MIME types defined:</strong> <code>text/x-octave</code>.</p>
84</article>