X-Git-Url: https://ruin.nu/git/?p=proglang.git;a=blobdiff_plain;f=documentation;h=cf26d0aafadec73cf148288555cd48e3ee6ea6ef;hp=cb693df417c88f4430589c5ac0de2ce533360c91;hb=5f2040d19e69f864edcc7f2e2d27ea9bd298d26a;hpb=67721d82f79e56db9c728aed76a3ad9dcca005c2 diff --git a/documentation b/documentation index cb693df..cf26d0a 100644 --- a/documentation +++ b/documentation @@ -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