Byte Programming Language - Complete Documentation (v1.8)

Introduction

Byte is a lightweight interpreted scripting language designed for simplicity, educational use, and rapid prototyping. Its syntax allows for variables, functions, loops, conditionals, buttons, object interactions, and basic graphics operations easily with it's simple keywords and syntax. Byte is particularly suitable for creating small games or interactive scripts with minimal overhead. Note: Future updates may introduce new keywords or behavior, so older scripts may occasionally require adjustments.

Byte Logo

Core Syntax Rules

Keywords & Their Uses

Below is a comprehensive list of keywords with their purpose and example usage:

KeywordDescriptionExample
STRIndicates the start of a script.STR
EXEExecutes a named function.EXE [MyFunction]
REDReads input from the user (not fully interactive in web context).RED "Hello"
DLEDeletes a variable or data reference.DLE a.z.a
VARDeclares a variable, initialized to 0 by default.VAR [Counter] ST
STOImmediately stops script execution.STO
THNUsed in conditional statements for readability.IF X > 5 THN
WITPauses execution for a given number of seconds.WIT = 3
RRIPrints output to the console.RRI("Hello")-
onStrAutomatically runs when the script starts.onStr = ... end
funcDefines a reusable function.func MyFunc = ... end
constDeclares an immutable value.const PI = 3.14
-c + NLoop that executes N times. Multi-line or single-line versions supported.-c + 5 = ... -
ButtonCreates a clickable UI button linked to a function.Button + "Click" EXE [Func]
ChangeDynamically updates a variable or value.Change X = 5
SIPHONTemporarily siphons objects or variables. Duration optional.SIPHON + 5
ShareExposes data outside of local scope.Share [Counter]
addNum / dleNumQuickly increment or decrement the most recently declared variable.addNum + 1
doCalls a function or evaluates a variable reference that points to a function.do MyFunc
IF / AND / NOT / ENDConditionals for logical flow control.IF X > 0 AND Y < 10 THN ... END
LINStores a line of input or string globally.LIN Hello
raycast / Hit / velocity / Spawn.NewObject detection, movement, or spawning primitives.velocity = 5
KeybindAssign a keyboard key to trigger a function.Keybind + "A" EXE [Func]
math.Add / math.Sub / math.Mul / math.DivBasic arithmetic operations. Can operate on variables or numbers.math.Add 2 + 3 =

Data Types

Variables declared globally persist throughout the script; inside a function, they are local unless explicitly shared. Memory management is automatic, except const, which is immutable.

Control Flow

Advanced Functions

Performance Tips

API

!! IF YOU ARE USING BYTE FOR API, IT'S HERE !!

Math Operations

Math commands start with math. followed by the operation (Add, Sub, Mul, Div). Operands can be numeric literals or variables (using do for variable evaluation). Example:

STR
math.Add 1 + 4 =
math.Sub 7 - 2 =
math.Mul 2 * 4 =
math.Div 6 / 3 =

Output:

5
5
8
2

This illustrates Byte's support for arithmetic evaluation inline with script execution. Some answers may not be accurate since computers sometimes struggle with complex math equations. Think: decimals.

FAQ & Common Issues

Examples

Counter Button

STR
VAR [Counter] ST

IncreaseCounter =
    Counter = Counter + 1
    RRI ("Counter: " + Counter)-
end

onStr =
    Button + "Click Me" EXE [IncreaseCounter]
end

Loop with Wait

-c + 3 =
    RRI("Iteration")-
    WIT = 0.5
-

SIPHON Example

SIPHON + 3
RRI ("Siphoned for 3s")-

Conditional Stop

-c + 10 =
    IF Counter = 5 THN STO END
-

Best Practices

Summary

Byte is a compact but versatile language, ideal for scripting, UI interactions, and basic game logic. This documentation covers everything from keywords, syntax, loops, buttons, advanced functions, math operations, and debugging tips. Use this as a reference for your Byte projects.

Questions or suggestions? Contact: bytedevinquiries@gmail.com