betadin-0.2.0 is not a library.
Betadin
betadin is a simple programing language for research purposes, written in rust.
Features
- variables and constants
- functions
- conditional commands
- common operators
- for and while loops
- prototypes
- builtin modules and functions
- and more
Usage
- install betadin with cargo
- running files with betadin cli
Examples
# variables and constants
let name1 = "something"; # can be change
const name2 = "something"; # cannot be change
# functions
println; # prints 7;
# conditional commands and operators
let x = 10;
# if statement
if x >= 10 || true else
# if expression
let y = if x == 10 else ;
println; # prints "if block"
# for and while loops
for i in 1..10
let x = 0;
while x <= 10
# builtin modules and prototypes
# betadin have some builtin modules like "fs", "system", "env"
# system module
import system;
println;
# or
import ;
println;
# or
println;
# file system
import fs;
const content = read_file; # read
# reading file content line
# file content is a string so we can use string methods
println; # prints array of lines
println; # prints number of chars
println; # prints number of lines;
# more methods
write_file;
read_dir;
remove_file;
# and more
# env module
import env;
const args = args; # getting arguments
for arg in args
# custom module
module custom
println; # custom
# or
import ;
println # custom
more examples: https://github.com/Aidin53-kh/betadin/examples