(note: The input "open your mouth and say" won't work here, that will be fixed in the future)
Output will appear here...
JunkLang is a simple, esoteric programming language designed for fun! And I won't mind if you call it junk!
Usage: junklang {filename}.jnk
Variables are defined using the keyword order.
Example:
1.order chicken = 5
Arithmetic operations use the standard +, -, *, / with the keyword eat.
Example:
1.order chicken = 5
2.order fries = 2
3.order total = eat chicken + fries
Input is taken using open your mouth and say.
Example:
1.order coke = 2
2.open your mouth and say burger
3.order total = eat coke + burger
4.whisper total
Use whisper to print output.
Example:
1.whisper "I love junk food"
Functions are defined using reheat: name ... done. And then called using deliver()
Example:
1.reheat: doubleIt
2.order result = eat burgers * 2
3.done
4.order doubled = deliver(doubleIt)
5.whisper "Doubled burgers: " + doubled
Conditionals are written as if you like ... more than / less than / equal to ... else ... done.
Example:
1.if you like meal more than 5:
2. whisper "That's a big meal!"
3.else:
4. whisper "That's a snack."
5.done
Loops are defined using until thirsty ... done.
Example:
1.order counter = 0
2.until thirsty counter < 3:
3. whisper "Still hungry " + counter
4. order counter = eat counter + 1
5.done
Use hungry to add comments.
Example:
1.hungry This is not read!
Use barf("message") to raise errors.
Example:
1.barf("Oops! We dropped your sandwich.")