|
|
|
@ -4,10 +4,10 @@ My computer programming language made with LEX/YACC written in C. (interpreted)
|
|
|
|
|
# Downloads
|
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
|
|
Win-32: <a href=""/>download</a>
|
|
|
|
|
Win-64: <a href=""/>download</a>
|
|
|
|
|
Linux-32: <a href=""/>download</a>
|
|
|
|
|
Linux-64: <a href=""/>download</a>
|
|
|
|
|
* Win-32: <a href=""/>download</a>
|
|
|
|
|
* Win-64: <a href=""/>download</a>
|
|
|
|
|
* Linux-32: <a href=""/>download</a>
|
|
|
|
|
* Linux-64: <a href=""/>download</a>
|
|
|
|
|
|
|
|
|
|
# Hello World.
|
|
|
|
|
<hr/>
|
|
|
|
@ -23,8 +23,8 @@ call main;
|
|
|
|
|
|
|
|
|
|
# Variables
|
|
|
|
|
<hr/>
|
|
|
|
|
- Variables support "type juggling" where types are assumed at runtime.
|
|
|
|
|
- Variables can be assigned to each other even if they are different types.
|
|
|
|
|
* Variables support "type juggling" where types are assumed at runtime.
|
|
|
|
|
* Variables can be assigned to each other even if they are different types.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/* main function */
|
|
|
|
@ -45,7 +45,7 @@ call main;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Expressions
|
|
|
|
|
- As ov v0.9.5 expressions are only supported for int types, I need to recode the entire expression parsing system
|
|
|
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
@ -59,7 +59,7 @@ call main;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Scope
|
|
|
|
|
- As of v0.9.5 there is not scope inside of this programming language.
|
|
|
|
|
* As of v0.9.5 there is not scope inside of this programming language.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/* changes var from 10 to 100 */
|
|
|
|
@ -82,11 +82,12 @@ call main;
|
|
|
|
|
|
|
|
|
|
# Logic
|
|
|
|
|
<hr/>
|
|
|
|
|
- while loops are if statements
|
|
|
|
|
- As of version 0.9.5, logic conditions must only be variables.
|
|
|
|
|
* while loops are if statements
|
|
|
|
|
* As of version 0.9.5, logic conditions must only be variables.
|
|
|
|
|
|
|
|
|
|
### If statements
|
|
|
|
|
As stated above, if statement conditions must be a variable.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
def main:
|
|
|
|
|
{
|
|
|
|
@ -103,7 +104,9 @@ def main:
|
|
|
|
|
};
|
|
|
|
|
call main;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### While loop
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
def main:
|
|
|
|
|
{
|
|
|
|
@ -119,7 +122,8 @@ call main;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Functions
|
|
|
|
|
- Functions can be defined as variables (lambda) or defined normally.
|
|
|
|
|
* Functions can be defined as variables (lambda) or defined normally.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
def my_function:
|
|
|
|
|
{
|
|
|
|
@ -132,7 +136,7 @@ call my_function;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Redefinitions
|
|
|
|
|
- As of v0.9.5 everything in this programming language can be redefined. That means everything, including the function that
|
|
|
|
|
* As of v0.9.5 everything in this programming language can be redefined. That means everything, including the function that
|
|
|
|
|
is currently being executed.
|
|
|
|
|
```
|
|
|
|
|
def main:
|
|
|
|
|