This repository has been archived by the owner on Aug 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Documentation
Kick de Gans edited this page Dec 12, 2022
·
25 revisions
fusion --verify
fusion file.fn
sudo fusion --add-library <file>
print("Hello world!"); /* Print without newline */
println("Hello world!"); /* Print with newline */
input("Enter your name:"); /* Returns the value the user inputted */
var file = open("file", options); /* Open file */
read(file); /* Read file */
write(file, "content"); /* Write to file/stream */
string foo = "bar"; /* String */
int foo = 5; /* Integer */
double foo = 1.23; /* Double */
float foo = 0.45; /* Float */
bool foo = true; /* Boolean */
var foo = value; /* Any type */
const string foo = "bar"; /* String */
const int foo = 5; /* Integer */
const double foo = 1.23; /* Double */
const float foo = 0.45; /* Float */
const bool foo = true; /* Boolean */
const var foo = value; /* Any type */
public string foo = "bar"; /* String */
public int foo = 5; /* Integer */
public double foo = 1.23; /* Double */
public float foo = 0.45; /* Float */
public bool foo = true; /* Boolean */
public var foo = value; /* Any type */
fn foo() /* No arguments*/
{
...
};
fn foo(bar) /* Arguments */
{
...
};
fn foo() ... /* Consise function */
if (condition) /* If statement */
{
...
};
elseif (condition)
{
...
};
else
{
...
};
while (condition)
{
...
};
until (condition)
{
...
};
dowhile (condition)
{
...
};
dountil (condition)
{
...
};
for (foo => bar)
{
...
};