]> ruin.nu Git - proglang.git/blobdiff - documentation
moved comments to examples
[proglang.git] / documentation
index cb693df417c88f4430589c5ac0de2ce533360c91..cf26d0aafadec73cf148288555cd48e3ee6ea6ef 100644 (file)
@@ -1,8 +1,6 @@
 ####### DOCUMENTATIATOIAITAT ION ########
 
 
-
-
 a simple c-like language with support for if/else-statements, while-loops and the standard arithmetic (+, -, /, *) and comparison expressions (<, >, <=, >=, ==, !=). also, increase/decrease expressions (++, --) are supported.
 
 data types:
@@ -11,67 +9,3 @@ integers and booleans.
 comments:
 // and /* */ comments are allowed.
 
-
-
-
-
-
-
-
-
-
-
-
-
-examples:
-
-fib
----
-int n1 = 0;
-int n2 = 1;
-int n = readInt;
-
-while(n-- > 0){
-  int temp = n1+n2;
-  n1 = n2;
-  n2 = temp;
-}
-print n2;
-
-
-tests while, decr and assignment.
-
-
-
-if
---
-if (readBool) {
-  if (readInt < 0)
-    print true;
-  else
-    print false;
-}
-
-
-tests if and if/else.
-
-
-
-sum
----
-int n;
-int sum = 0;
-while ((n = readInt) != -1) sum = sum + n;
-print sum;
-
-
-
-
-var
----
-int a = 3;
-int b = a - 5;
-int c = a + b*7;
-bool d = a == b;
-
-tests simple variable operations.
\ No newline at end of file