openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

index.html (1440B)


      1 <!doctype html>
      2 
      3 <title>CodeMirror: Pascal 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="pascal.js"></script>
     10 <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
     11 <div id=nav>
     12   <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
     13 
     14   <ul>
     15     <li><a href="../../index.html">Home</a>
     16     <li><a href="../../doc/manual.html">Manual</a>
     17     <li><a href="https://github.com/codemirror/codemirror">Code</a>
     18   </ul>
     19   <ul>
     20     <li><a href="../index.html">Language modes</a>
     21     <li><a class=active href="#">Pascal</a>
     22   </ul>
     23 </div>
     24 
     25 <article>
     26 <h2>Pascal mode</h2>
     27 
     28 
     29 <div><textarea id="code" name="code">
     30 (* Example Pascal code *)
     31 
     32 while a <> b do writeln('Waiting');
     33  
     34 if a > b then 
     35   writeln('Condition met')
     36 else 
     37   writeln('Condition not met');
     38  
     39 for i := 1 to 10 do 
     40   writeln('Iteration: ', i:1);
     41  
     42 repeat
     43   a := a + 1
     44 until a = 10;
     45  
     46 case i of
     47   0: write('zero');
     48   1: write('one');
     49   2: write('two')
     50 end;
     51 </textarea></div>
     52 
     53     <script>
     54       var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
     55         lineNumbers: true,
     56         mode: "text/x-pascal"
     57       });
     58     </script>
     59 
     60     <p><strong>MIME types defined:</strong> <code>text/x-pascal</code>.</p>
     61   </article>