A Simple Language for Learning
Zerionyx is a beginner-friendly, task-oriented language designed for education and automation.
# Hello World
println("Hello, World!")
print("Hello, World!\n")
# Arithmetic
x = 10
y = 20
println(x + y)
println(x - y)
println(x * y)
println(x / y)
println(x % y)
println(x // y)
println(x ^ y)
# Function definition
defun add(a, b)
return a + b
done
# One-line function
defun add(a, b) -> a += b
println(add(5, 3))
# Lists
nums = [1, 2, 3, 4, 5]
append(nums, 6)
println(nums)
println(nums$0)
println(nums$5)
# HashMaps
users = []
append(users, {})
users$0$"name" = "user-1"
users$0$"password" = "123456"
println(users)
println(users$0$"name")
println(users$0$"password")
# Bytes
str_enc = to_bytes("Hello, World!")
println(to_str(str_enc))
println(str_enc$0)
println(str_enc$4)
# PyObject
os = pyexec("import os", {})
println(type(os))
r = pyexec("os.system('echo Hello, World!')", os)
# CFloat
tcf = to_cfloat
lst = [tcf("1/9")] * 9
x = tcf(0)
for i in lst do
x += i
done
println(x == 1)
# Conditional
if x > y do
println("X is greater")
elif x < y do
println("Y is greater")
else do
println("X is equals to Y")
done
# For-in loop
for i in nums do
println(i)
done
# For loop
for i = 1 to 11 do
println(i)
done
# While loop
a = 1
while a > 100 do
a += 1
done
println(a)
# NameSpace
namespace m
pi = 3.14
defun area(r) -> pi * r * r
done
println(m.area(5))
Why Zerionyx?
Beginner-Friendly
With a clear and simple syntax, Zerionyx is ideal for those taking their first steps in programming.
Task Automation
Includes built-in tools for common automation tasks like file handling and system commands.
Educational Focus
Comes with educational libraries for exploring mathematics, algorithms, and fundamental concepts.