1
0

index.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CodeMirror: Pascal mode</title>
  6. <link rel="stylesheet" href="../../lib/codemirror.css">
  7. <script src="../../lib/codemirror.js"></script>
  8. <script src="pascal.js"></script>
  9. <link rel="stylesheet" href="../../doc/docs.css">
  10. <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
  11. </head>
  12. <body>
  13. <h1>CodeMirror: Pascal mode</h1>
  14. <div><textarea id="code" name="code">
  15. (* Example Pascal code *)
  16. while a <> b do writeln('Waiting');
  17. if a > b then
  18. writeln('Condition met')
  19. else
  20. writeln('Condition not met');
  21. for i := 1 to 10 do
  22. writeln('Iteration: ', i:1);
  23. repeat
  24. a := a + 1
  25. until a = 10;
  26. case i of
  27. 0: write('zero');
  28. 1: write('one');
  29. 2: write('two')
  30. end;
  31. </textarea></div>
  32. <script>
  33. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  34. lineNumbers: true,
  35. mode: "text/x-pascal"
  36. });
  37. </script>
  38. <p><strong>MIME types defined:</strong> <code>text/x-pascal</code>.</p>
  39. </body>
  40. </html>