index.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!doctype html>
  2. <title>CodeMirror: Octave mode</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../../doc/docs.css">
  5. <link rel="stylesheet" href="../../lib/codemirror.css">
  6. <script src="../../lib/codemirror.js"></script>
  7. <script src="octave.js"></script>
  8. <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
  9. <div id=nav>
  10. <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
  11. <ul>
  12. <li><a href="../../index.html">Home</a>
  13. <li><a href="../../doc/manual.html">Manual</a>
  14. <li><a href="https://github.com/marijnh/codemirror">Code</a>
  15. </ul>
  16. <ul>
  17. <li><a href="../index.html">Language modes</a>
  18. <li><a class=active href="#">Octave</a>
  19. </ul>
  20. </div>
  21. <article>
  22. <h2>Octave mode</h2>
  23. <div><textarea id="code" name="code">
  24. %numbers
  25. 1234
  26. 1234i
  27. 1234j
  28. .234
  29. .234j
  30. 2.23i
  31. 23e2
  32. 12E1j
  33. 123D-4
  34. 0x234
  35. %strings
  36. 'asda''a'
  37. "asda""a"
  38. %identifiers
  39. a
  40. as123
  41. __asd__
  42. %operators
  43. -
  44. +
  45. =
  46. ==
  47. >
  48. <
  49. >=
  50. <=
  51. &
  52. ~
  53. ...
  54. break zeros default margin round ones rand
  55. ceil floor size clear zeros eye mean std cov
  56. error eval function
  57. abs acos atan asin cos cosh exp log prod sum
  58. log10 max min sign sin sinh sqrt tan reshape
  59. return
  60. case switch
  61. else elseif end if otherwise
  62. do for while
  63. try catch
  64. classdef properties events methods
  65. global persistent
  66. %one line comment
  67. ...one line comment
  68. %{ multi
  69. line commment %}
  70. 1
  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. tabMode: "shift",
  80. matchBrackets: true
  81. });
  82. </script>
  83. <p><strong>MIME types defined:</strong> <code>text/x-octave</code>.</p>
  84. </article>