duna run <PATH_TO_FILE>
duna version
or duna -v
duna git
duna template
-> Segmentation Fault
- Comming Soon
duna arg parse
LOL Code do stuff from in block
fx say_name(str name)
{
cout("Hello, $(name)!");
}
Um... well... there variables :/
float x = 1.5;
int y = 2;
str z = "Hello";
Stores object and properties
obj car = {
int price = 2000;
str colour = "Red";
}
Lets be honest, we rarely use these anyways
{
Data_one,
Data_two,
Data_three
} enum_name;
Uses other files data
src s = include("examples/fileone.dun")
src v = visit(s)
Repeats a certain amount of time
for(int i = 0; i < 10; i+=1)
{
write(i);
}
Writes to a file
obj file = fopen("hello_world.txt", "w+")
fputs("This is a random sentence", file)
Writes file
obj file = fopen("file.extention", "permission")
Deletes file
fclose(file)
Stores multible variable with any type
fx print_list(list l)
{
fx list_printer(fx e)
{
write(e);
}
iterate l with list_printer;
}
print_list(["apple", "pear", "banana"]);
There are not read by the lexer or parser
### This is a note
Compares a value without a if
else
statement
int x = 5;
str name = x > 3 ? "John" : "David";
write(name);
Writes the properties of the function
{
### Returns amount of arguments required
write(this)
}
something()
Creates a timer to get current date data
obj timer = time()
write(timer.seconds)
int number = randint(1,10)
randint(minimum, maximum)
Compares 2 strings
strcmp("Hello", "hello");
Returns 0 if compares true
Combinds 2 strings
strcmb("Foo ", "bar");
str UPPERCASE_SENTENCE = "HELLO WORLD!"
str lowercased = toLowercase(UPPERCASE_SENTENCE)
cout(lowercased)
Makes each letter in string to lowercase
str LOWERCASE_SENTENCE = "hello world!"
str uppercased = toUppercase(LOWERCASE_SENTENCE)
cout(uppercased)
Makes each letter in string to uppercase
This language is owned by TechPenguineer, who is also formally known as the owner of Zeno Inc. We have all right to own this language into our organization.
This template was made by sebbekarlsson! All credit goes to him!!