1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-01-01 06:32:07 +00:00

Increment and decrement

This commit is contained in:
David Schmenk 2016-01-06 12:45:44 -08:00
parent bfd0f367ad
commit ccfbbdb2c6

View File

@ -497,6 +497,18 @@ Address operators can work on any value, i.e. anything can be an address. Parent
| || | logical OR (alt)
| && | logical AND (alt)
#### Increment and Decrement
PLASMA has an increment and decrement statement. This is different than the increment and decrement operations in languages like C and Java. Instead, they cannot be part of an expression and only exist as a statement as postfix:
```
byte i
i = 0
while i < 100
i++
loop
```
### Statements
PLASMA definitions are a list of statements the carry out the algorithm. Statements are generally assignment or control flow in nature. Generally there is one statement per line. The ';' symbol seperates multiple statements on a single line. It is considered bad form to have multiple statements per line unless they are very short.