example.txt 773 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* Maxima computer algebra system */
  2. print ("mumble");
  3. /* this
  4. /* this is
  5. /* this is a nested comment */ nested comment
  6. */ comment
  7. */
  8. sin(%pi); /* should be highlighted again */
  9. /* programming keywords */
  10. if a then b elseif c then d else f;
  11. for x:1 thru 10 step 2 do print(x);
  12. for z:-2 while z < 0 do print(z);
  13. for m:0 unless m > 10 do print(m);
  14. for x in [1, 2, 3] do print(x);
  15. foo and bar or not baz;
  16. /* different kinds of integers */
  17. ibase : 18 $
  18. [0, 1234, 1234., 0abcdefgh];
  19. reset (ibase) $
  20. /* strings */
  21. s1 : "\"now\" is";
  22. s2 : "the 'time' for all good men";
  23. print (s1, s2, "to come to the aid",
  24. "of their country");
  25. /* expressions */
  26. foo (x, y, z) :=
  27. if x > 1 + y
  28. then z - x*y
  29. elseif y <= 100!
  30. then x/(y + z)^2
  31. else z - y . x . y;