You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.8 KiB

2 months ago
  1. <!doctype html>
  2. <title>CodeMirror: SAS 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="../xml/xml.js"></script>
  8. <script src="sas.js"></script>
  9. <style>
  10. .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
  11. .cm-s-default .cm-trailing-space-a:before,
  12. .cm-s-default .cm-trailing-space-b:before {position: absolute; content: "\00B7"; color: #777;}
  13. .cm-s-default .cm-trailing-space-new-line:before {position: absolute; content: "\21B5"; color: #777;}
  14. </style>
  15. <div id=nav>
  16. <a href="https://codemirror.net/5"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
  17. <ul>
  18. <li><a href="../../index.html">Home</a>
  19. <li><a href="../../doc/manual.html">Manual</a>
  20. <li><a href="https://github.com/codemirror/codemirror5">Code</a>
  21. </ul>
  22. <ul>
  23. <li><a href="../index.html">Language modes</a>
  24. <li><a class=active href="#">SAS</a>
  25. </ul>
  26. </div>
  27. <article>
  28. <h2>SAS mode</h2>
  29. <form><textarea id="code" name="code">
  30. libname foo "/tmp/foobar";
  31. %let count=1;
  32. /* Multi line
  33. Comment
  34. */
  35. data _null_;
  36. x=ranuni();
  37. * single comment;
  38. x2=x**2;
  39. sx=sqrt(x);
  40. if x=x2 then put "x must be 1";
  41. else do;
  42. put x=;
  43. end;
  44. run;
  45. /* embedded comment
  46. * comment;
  47. */
  48. proc glm data=sashelp.class;
  49. class sex;
  50. model weight = height sex;
  51. run;
  52. proc sql;
  53. select count(*)
  54. from sashelp.class;
  55. create table foo as
  56. select * from sashelp.class;
  57. select *
  58. from foo;
  59. quit;
  60. </textarea></form>
  61. <script>
  62. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  63. mode: 'sas',
  64. lineNumbers: true
  65. });
  66. </script>
  67. <p><strong>MIME types defined:</strong> <code>text/x-sas</code>.</p>
  68. </article>