From Esolang
Jump to navigation Jump to search

Zed Language

Zed is a language consisting of a total of 32 distinct symbols. A program consists of commands, as well as nested loops, scopes, threads, variables, and functions. Each scope has a single stack of which infinite signed long numbers may be added to. A memory value is also present. Labels may be used for definitions or calls.

Symbol Action
+ Increment Memory By 1
- Decrement Memory By 1
? Pop From Stack
! Push To Stack
% Get Stack Size
. Output Unicode Character
, Input Unicode Character
: Restart Execution
; Complete Execution
* Delay Milliseconds
< Initiate New Thread
> End Thread
( Repeat Equal to Value or Variable
) End Repeat or Variable
[ Repeat Until 0 or Function
] End Repeat or Function
{ New Scope Block
} End Scope Block
# Export Memory To Child Scope
& Import Memory From Parent Scope
/ Max Long Value
\ Reset Memory Value
= Modify Execution Position
" Get Execution Position
' Set Execution Position
~ Opposite of Value
` Exit Program
$ Toggle Debug Mode
@ Get Scope Depth
| Get Milliseconds Since
^ Access Parent Scope
_ Access Child Scope

Variables, scopes, and threads are computed immediately. Functions are saved. A function call runs that bit on the current scope. A scope call becomes the current scope. Variable calls replace the value. This language is a work in progress, but here are some of the very programs that work on the fully functional Java interpreter.

Program Description
++++((+))+.+.+. Print ABC
+[,!]?%(?.) Reverse Input
dbl[(+)] ++++dbl dbl dbl dbl+.+.+. Function Example