Bytewen Documentation

The minimalistic programming language for simplicity and power

Overview

Bytewen is a minimalistic programming language that focuses on simplicity and ease of use. It is designed for rapid prototyping, education, and small projects where clarity and speed matter. Bytewen's syntax is clean, making it accessible for beginners while remaining powerful enough for advanced users.

Basic Syntax

Here is an example of the basic syntax used in Bytewen:

x = 10
y = 5
output "The sum is " + (x + y)
            

Variables are defined using =, and output is done using the output command.

Commands

  • output: Prints text or variables to the screen.
  • output "Hello, World!"
  • input: Gets user input and stores it in a variable.
  • input name
    output "Welcome, " + name
  • if: Creates a conditional block of code.
  • if (x == 5) {
        output "x is 5"
    }
                    
  • repeat: Loops through a block of code a certain number of times.
  • repeat 5 {
        output "This will print 5 times"
    }
                    

Examples

Here are some examples of Bytewen code:

# Sum two numbers
x = 5
y = 10
output "Sum: " + (x + y)

# Input name and greet user
input name
output "Hello, " + name
            

Possibilities

In Bytewen, functions are called "possibilities". They allow you to define reusable blocks of code.

possibility greet {
    output "Hello from Bytewen!"
}

call greet
            

Advanced Features

Bytewen also includes more advanced features such as:

  • Random Number Generation: Generates a random number between two values.
  • randomNumber(1, 100)
                    
  • Time and Date: Outputs the current time.
  • currentTime