← Back to StudioTHE E++ GUIDE 1.4a2

E++ 1.4a2 Wiki

An approachable guide to E++, from your first line to games, animated drawings and shared projects. For exact syntax and diagnostic codes, see LANGUAGE.md.

Contents

What is E++?

E++ is an English-like programming language. It has a browser Studio for writing and running projects, a native C++ command-line engine, and a Python runner. The engines share core language rules and project-file support, but not every visual feature or library is available in each engine.

The three rules to remember:

  1. Use double quotes for text: "Hello".
  2. Use single quotes for variable names: 'score'.
  3. Write maths without quotes: 2 plus 3.

say hello is not a text shortcut: it produces an unquoted-text error. Use say "hello". Variable names are case-insensitive. Notes use note [explanation]; # and // are not E++ comments.

Start and find your way around

Run npm start with Node.js 18 or newer, and open http://localhost:8000 on the same machine. Opening index.html directly works offline for the editor, Draw, Game and EShare.

The Studio keeps personal working files and linked pictures in the current browser. Do not rely on a browser as your only backup: export important projects and their keyring.

Tutorial: output and maths

Create a new .enpp file, type this and press Run code:

note [My first program]
say "Hello, E++!"
say 7 plus 5
say 2 plus 3 times 4
say "2 plus 3"

The last line prints the words inside the quotes, not their calculated value. Arithmetic supports plus, minus, times, divided by and operators such as +, -, * and /. Parentheses can group arithmetic. A division by zero is an error.

Tutorial: variables and questions

let 'name' be "Ada"
let 'score' be 10
say "Hello, ", 'name'
let 'score' be 'score' plus 1
say "Score:", 'score'
ask "What is your name?" and save the output as 'visitor'
say "Welcome, ", 'visitor'

The ask line waits for input in the console. let, define ... as, and set ... to can assign values. say can join several pieces with commas; text still needs double quotes, and variable references need single quotes.

Tutorial: decisions and loops

let 'score' be 5
if 'score' is greater than 3 then say "Great work!"
otherwise say "Keep trying!"

repeat 3 times
  say "Practice makes progress."
end repeat

let 'count' be 1
while 'count' is less than 4 do
  say 'count'
  let 'count' be 'count' plus 1
end while

Place otherwise on the next line, not after the first say. Blocks can also use if ... then:, else: and end if. Close every repeat, while, and block if with the corresponding end. Syntax is checked even in a branch that does not run.

Tutorial: add a library

A library unlocks extra words. Use a .enppl project and add it before using its features:

add library "Math"
add library "Strings"
say the square root of 144
say the uppercase of "hello"

Other common libraries include Random, Time, Files, System and Python. The full Studio also offers Colors, Draw, Game and ImprovedWait. The ZIP has ImprovedWaitLite rather than ImprovedWait and does not contain Colors, Draw or Game. A missing declaration reports E301; a library not in that build reports E302.

Drawing with animated sprites

Draw is available in the full Studio, not in E++.zip or the command-line engines. Any single-quoted variable name can become a visible, controllable cursor.

add library "Draw"
define 'pencil' as drawing sprite
set the color of 'pencil' to "#ffcc88"
set the speed of 'pencil' to 200
'pencil' move right "100"
'pencil' move down "100"
'pencil' move left "100"
'pencil' move up "100"

Games and pictures

Game is Studio-only. Start with game_showcase.enppl, or write:

add library "Game"
set the game window to 640 by 480
set the game background to "night"
create the actor 'hero'
put the actor 'hero' at 0 and 0
'hero' move right "50"

Choose Image after adding Game, select a local picture, give it the name hero, and link it. The picture panel can insert the actor setup for you. Local files are decoded and resized before being linked; they are stored as embedded image data, not fetched from a remote server when the game runs. Transparency is preserved. The included example has two embedded starter pictures.

A broken or unsupported upload is refused with a message. If an older link or an external URL fails, the panel explains that it could not load and the game displays a labelled tile; unlink and upload the picture again. A URL or relative filename written in code still depends on that resource being available. Exported and EShare projects carry their linked embedded pictures.

The game window uses its centre as (0, 0). set the size of the actor 'hero' to 2 doubles its size. show, hide, and if 'hero' is touching 'gem' then ... work with actors. A play the game / end the game block runs once per frame. Add Keyboard for checks such as if the "Up arrow" key is pressed then 'hero' move up "5"; use Stop game or stop the game to finish. ImprovedWait adds actor pause, resume and wait features.

Sharing with EShare

Open Tools → EShare and choose your current project or an .enpp / .enppl file. Copy the resulting code and send it to someone; they can use Tools → Import and paste it to open a new local copy. The code includes embedded pictures. An encrypted file selected for sharing must first be unlockable by the keyring on that device.

EShare codes include their decryption key. Anyone holding a code can read the project, so never share secrets. EShare works locally without a server. The former gallery API remains available for compatibility, but is no longer the Studio sharing interface.

Saving, exporting and keys

The editor auto-saves working files in the browser. .enpp denotes a pure program; .enppl is used for programs with libraries. The command-line engines also accept older .eppl and .eppla examples.

Export downloads a sealed project and keeps its key in this browser. Keys can export a keyring file and import it on another machine. Keep the keyring private and back it up alongside the project; a sealed project cannot be opened without a matching key. The CLI accepts --keyring epp-keys.json project.enppl. Studio-exported projects include linked pictures. EShare includes its key in the code; anyone with it can open the project.

Runtime and library differences

The Studio loads src/lexer.cpp compiled to WebAssembly and consumes its real tokens in a JavaScript evaluator. It is not running the C++ parser or interpreter in the browser. If the compiled lexer is unavailable, execution stops with E601; there is no silent alternate lexer.

The native ./epp uses the C++ lexer, parser and interpreter. python3 epp.py uses the Python engine. Their core syntax and diagnostics overlap with Studio, but they do not provide its Draw or Game canvas. Studio translates a subset of Python to JavaScript and is not a full Python interpreter. The command-line Python bridge can run Python on the machine; only run code you trust.

In the full Studio: Math, Random, Strings, Colors, Console, Time, Files, System, Python, Keyboard, Draw, Game and ImprovedWait are available. In E++.zip: Colors, Draw, Game and ImprovedWait are unavailable, while ImprovedWaitLite is available. The archived native and Python runners also reject Colors. The full repository’s native and Python runners retain Colors. Availability does not imply identical OS, filesystem, Python or graphical behavior across engines.

Build the native engine with make, run tests with make test and npm test, and rebuild the archives with make zip. Browser regression tests require Playwright and a local Chromium executable; see the repository test scripts.

Errors and troubleshooting

Keyboard and accessibility

Use Ctrl+Enter or Cmd+Enter to run, and Ctrl+S or Cmd+S to save. Dialogs retain keyboard focus and close with Escape. The mobile workspace and Draw controls have touch targets; the canvas is keyboard-focusable. The Output panel is a live region. Use browser zoom, high-contrast mode and line wrapping as needed.