Update 'Reference'
parent
4b52f7b5b8
commit
3e6e01adbc
64
Reference.md
64
Reference.md
|
@ -45,3 +45,67 @@ The currently available opcodes are as follows:
|
|||
- `<filename>[-optional-list-of-functions-or-variables-to-import]`
|
||||
- the list of values should be separated by a `-`. Each value should have the following syntax:
|
||||
- `<f or v, function or variable, respectively><name of function/variable>`
|
||||
|
||||
|
||||
|
||||
# Comments
|
||||
|
||||
You can use a `#` character to create a comment. It works anywhere in the line, but everything after the `#` will be ignored by the interpreter.
|
||||
|
||||
For example:
|
||||
|
||||
```sandwich
|
||||
pHello World!
|
||||
|
||||
# This line will be ignored
|
||||
|
||||
pThis part will be printed # and this part will not be printed
|
||||
```
|
||||
|
||||
|
||||
# Example Program
|
||||
|
||||
Here's an example program that shows all of these concepts in action:
|
||||
|
||||
```sandwich
|
||||
lhHello
|
||||
lwWorld!
|
||||
# prints hello world
|
||||
p$h $w
|
||||
p$h $w
|
||||
lx33333333
|
||||
ly3
|
||||
a15-16
|
||||
s19-4
|
||||
m3-3
|
||||
d9-$y
|
||||
a$x-27
|
||||
lv0
|
||||
fza$v-2
|
||||
lv*z
|
||||
p$v
|
||||
|
||||
fxa3-3
|
||||
fys*x-1
|
||||
p*y
|
||||
|
||||
fxa10-10
|
||||
fys10-5
|
||||
p*x *y
|
||||
|
||||
ptest # Prints test
|
||||
|
||||
itest.txt-vf-fc
|
||||
#itest.txt
|
||||
p$f
|
||||
p*c
|
||||
|
||||
ln<Enter your name:
|
||||
pYour name is $n.
|
||||
|
||||
lo<Enter the first number:
|
||||
lt<Enter the second number:
|
||||
|
||||
faa$o-$t
|
||||
pThe result is *a
|
||||
```
|
Loading…
Reference in New Issue