From ab0610854ad08eb4ba004bf83e881017b79902d8 Mon Sep 17 00:00:00 2001 From: xerox Date: Mon, 20 Jan 2020 17:32:03 -0800 Subject: [PATCH] Update README.md --- README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1aa6e75..8b41216 100755 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Supported operating systems and downloads: # Hello World. Hello world in Deon. -``` +```c def main: { print["hello world"]; @@ -24,7 +24,7 @@ call main; * Variables support "type juggling" where types are assumed at runtime. * Variables can be assigned to each other even if they are different types. -``` +```c /* main function */ def main: { @@ -46,7 +46,7 @@ call main; * As ov v0.9.5 expressions are only supported for int types, I need to recode the entire expression parsing system to support up to doubles. -``` +```c def main: { var = 10 + (5 * 2 / (11 % 2)); @@ -59,7 +59,7 @@ call main; # Scope * As of v0.9.5 there is not scope inside of this programming language. -``` +```c /* changes var from 10 to 100 */ def another_function: { @@ -85,7 +85,7 @@ call main; ### If statements * As stated above, if statement conditions must be a variable. -``` +```c def main: { var = 1; @@ -104,7 +104,7 @@ call main; ### While loop -``` +```c def main: { var = 1; @@ -121,7 +121,7 @@ call main; # Functions * Functions can be defined as variables (lambda) or defined normally. -``` +```c def my_function: { some_function = { @@ -136,13 +136,15 @@ call my_function; * As of v0.9.5 everything in this programming language can be redefined. That means everything, including the function that is currently being executed. -``` +```c def main: { - main = { - print["i just redefined main"]; - }; + main = { + print["i just redefined main"]; + }; }; call main; call main; ``` + +