We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Easylang

From Esolang
Jump to navigation Jump to search

Easylang

Description & notes

it is not actually an esolang, but this is the only place User:Jaxcoder could publish it. Here are several tables. (Note: the following two notes talk about the syntax this page uses, NOT the actual language.) (Note: in inputs, _# means number, _? means Boolean, _* means code, _v is an option (with a set list, the list input in parentheses after the v) and _ means all.) (Note 2: in inputs, - means text in-between arguments, and in name, _ means inputs in-between the text)

Format

The Code input has { at start and } at end. Example:

If (true) {
Output (Works)
}

Also, if there are multiple text inputs next to each other it would look like this:

function (hello, 2nd in)

Functions

Set | N, V, R? | Sets variable N to value V

If | Q?, C* | If Q? then C* *Variables created inside a Define block are local to that function call if R? Is true.

If _ Else | Q?, C* - E* | if Q? Then C* Else E*

If _ Elif | Q?, C* - EC? E* | If Q? Then C* Else If EC? Then E*

While | Q?, C* | While Q do C*

Jump | X# | Jumps to X#

Output | X | Outputs x to whatever the thing that runs the code chooses.

Input | Gets input from the user in some way

Draw Triangle _ At | A#, B#, C#, D#, E#, F# | Draws a triangle with points A# & B#, C# & D#, E# & F#.

Define | X, Y, C* | creates a function with the name X with parameters Y and code C*

Return | X | Exits the current function and returns X.

Returning

Op | X#, Yv (+, -, *, /, %, ^, =, <, >), Z# | Solves X# and Z# with Yv. (=, <, and >return true and false)

Bool | X?, Yv (NAND, AND, OR, NOR, XOR, XNOR), Z? | Op but with Boolean logic

Not | X? | Does the NOT operation on X?

_ = _ | X - Y | is X equal to Y?

Length | X | gets length of X

_ in _ | X# - Y | gets character in position X# in Y

Concat | X, Y | Joins X and Y together into one string.

Code | X | Returns the ASCII/Unicode number of character X.

Char | X# | Returns the character for ASCII/Unicode number X#.

List | X* | Creates a list containing items X* (separated by commas).

Add _ To _ | X - Y | Returns list Y with item X added to the end.

Get _ From _ | X# - Y | Gets the item at 1-based position X# in list Y.

  • Indexing in Easylang is 1-based (the first character or list item is at position 1).
  • Variables created inside a Define block are local to that function call if R? Is true.
  • Multiple parameters in Define are separated by commas:
Define (Add, a, b) {
Return (Op (a, +, b)) 
}