!English

From Esolang
Jump to navigation Jump to search

!English is a esolang made by Mihai Popa. It uses the English syntax, so any English person will understand it.

Commands

Command list
!English command Meaning
Print Prints a number or a string. It also works with directory listings.
Declare Declares a variable or a function.
If…Else Conditional statement.
While Loops until the specific condition is met.
For Loops for a number of times.
Trap Stops the program.
Give me Prompts for a user input.
Jump to Jumps to a part of the code.
Write Writes text to a file.
Create Creates a blank object (file or folder).
Delete Deletes a object (file or folder).
Rename Renames a object (file or folder).
Copy Copies a object (file or folder) to a destination.
Move Moves a object (file or folder) to a destination.
Put Puts the current working folder 1 folder (deep/shallow). Equivalent to cd on Windows for 1 folder deep and cd.. on Windows for 1 folder shallow.
Read Reads the file and prints its contents (or a line of the file).
Start Marks a part of the code. It also functions as a statement to start a file, webpage, etc…
End Marks the end of a part of the code.
Ignore Prohibits execution of this line (useful as a comment).
Hold Waits for a specific amount of time (or a keypress).

It can use extensions to add additional commands & functionality! Some of our commands are listed below:

Extended command list
!English command Meaning
Show Slimiar to "Print", useful for dialog boxes.
Generate A command that creates stuff, for example with AI.
Use Slimiar to "Declare" but only for APIs, etc…
Open Slimiar to "Start", but only with windows, etc…
Close Slimiar to "Trap", but closes a window. It not stops the program itself.

Examples

Hello, world!

Print "Hello, world!" and a newline

FizzBuzz

Declare x as a integer
For 100 times, using the integer x:
  If x modulo 3 is 0:
    Print "Fizz!" and a newline
  If x modulo 5 is 0:
    Print "Buzz!" and a newline
  If x modulo 15 is 0:
    Print "Fizz Buzz!" and a newline
  Else:
    Print the value of x and a newline

Dice roller

Declare x as a random number between 1 and 6
Declare y as a random number between 1 and 6
Print both values of x and y and a newline

Truth machine

Give me x as input
If x is 0:
  Print 0 and a newline
Else:
  While x is 1:
    Print 1 and a newline
    Hold for 200 milliseconds

Cat

Give me x as input
Print the value of x and a newline

A calculator

Start of this part: Menu
Print "This is the calculator!" and a new line
Print "Made in the !English programming language!" and a new line
Print "What to do?" and a new line
Print "1. Addition" and a new line
Print "2. Subtraction" and a new line
Print "3. Multiplication" and a new line
Print "4. Division" and a new line
Print "5. Modulo" and a new line
Print "6. Power" and a new line
Give me x as input
If x is 1:
  Jump to the addition part of the code
If x is 2:
  Jump to the subtraction part of the code
If x is 3:
  Jump to the multiplication part of the code
If x is 4:
  Jump to the division part of the code
If x is 5:
  Jump to the modulo part of the code
If x is 6:
  Jump to the power part of the code
End of this part: Menu

Start of this part: Addition
Give me x as input
Give me y as input
Declare z as a addition of x and y
Print the value of z and a newline
End of this part: Addition

Start of this part: Subtraction
Give me x as input
Give me y as input
Declare z as a subtraction of x and y
Print the value of z and a newline
End of this part: Subtraction

Start of this part: Multiplication
Give me x as input
Give me y as input
Declare z as a multiplication of x and y
Print the value of z and a newline
End of this part: Multiplication

Start of this part: Division
Give me x as input
Give me y as input
Declare z as a division of x and y
Print the value of z and a newline
End of this part: Division

Start of this part: Modulo
Give me x as input
Give me y as input
Declare z as a modulo of x and y
Print the value of z and a newline
End of this part: Modulo

Start of this part: Power
Give me x as input
Give me y as input
Declare z as a power of x and y
Print the value of z and a newline
End of this part: Power

Rickrolling (by a webpage)

Start this webpage: https://www.youtube.com/watch?v=dQw4w9WgXcQ

Quine

Declare x as "Declare x as
Print the value of x and a new line"
Print the value of x and a new line

Cheating quine

Print the program's source code

Shell

Declare x as a string
Print "$" and Give me x as input
If x is "echo" and has a argument called y:
  Print the value of y and a newline
If x is "move" and has 2 arguments, called y and z:
  Move the object y to z
If x is "copy" and has 2 arguments, called y and z:
  Copy the object y to z
If x is "cd" and has a argument called y:
  Put the working folder 1 folder deep
If x is "cd..":
  Put the working folder 1 folder shallow
If x is "make" and has a argument called y:
  Create a new object called y
If x is "rename" and has 2 arguments, called y and z:
  Rename the object y to z
If x is "directory" and has a argument called y:
  Print the directory listing of the folder y
If x is "type" and has a argument called y:
  Read the file y
Else:
  Print "Error!" and a new line

More examples are at !English/Examples

See also