Syms
Jump to navigation
Jump to search
Syms is a stack-based language made by User:CatIsFluffy without many built in stack manipulation operators, but tools to build them.
Commands
These are for the latest versions of Syms (1.4+). For older versions, please refer to this old version of the page.
Code | What it does |
---|---|
{...} |
Push "..." to the stack as a string. Nestable. |
$c |
Push "c" to the stack as a string. |
number |
Push number to the stack as a number. |
\ |
Escape the next character in a string. |
& in string |
Insert top of stack into string. |
" |
True |
' |
False |
> |
|
< |
Input |
+ |
Add/join strings (b+a pop a first) |
- |
Subtract (b-a pop a first) |
* |
Multiply/string repeat |
/ |
Divide (b/a pop a first) |
; |
Cast to number |
= |
Equal |
! |
Logical NOT |
& outside of string |
Logical AND |
| |
Logical OR |
@ |
Index into string |
# |
Length of string |
: |
Cast to string |
~ |
Swap top two stack elements |
] |
Pop |
) |
Execute string as code |
? |
If top element then ) else ] |
( |
Escape a string (surround with {} and escape &\ )
|
[ |
Duplicate |
_ |
Stack empty? |
Examples
Self interpreter (no autoprint)
{Program:}<)
Interpreter
Available at Github or run programs at Try it online!