mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-03-20 03:31:27 +00:00
Move inc/dec below statements
This commit is contained in:
parent
cb19d7b0f4
commit
8e62b45c4a
@ -497,18 +497,6 @@ 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 in 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.
|
||||
|
||||
@ -527,6 +515,18 @@ keypress = ^$C000 // read keyboard
|
||||
^$C010 // read keyboard strobe, throw away value
|
||||
```
|
||||
|
||||
#### 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 in postfix:
|
||||
|
||||
```
|
||||
byte i
|
||||
|
||||
i = 0
|
||||
while i < 100
|
||||
i++
|
||||
loop
|
||||
```
|
||||
|
||||
#### Control Flow
|
||||
PLASMA implements most of the control flow that most higher level languages provide. It may do it in a slightly different way, though. One thing you won't find in PLASMA is GOTO - there are other ways around it.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user