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 Feb 13, 2023
·
25 revisions
fusion --verify
fusion file.fn
sudo fusion-packages --add-library <file>
sudo fusion-packages --update
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 */
proc foo() /* No arguments*/
{
...
}
proc foo(bar) /* Arguments */
{
...
}
proc foo() ... /* Concise function */
if (condition) /* If statement */
{
...
}
else if (condition)
{
...
}
else
{
...
}
while (condition)
{
...
}
until (condition)
{
...
}
dowhile (condition)
{
...
}
dountil (condition)
{
...
}
for (int i = 0; i < 5; i = i + 1)
{
...
}
foreach (x -> source)
{
...
}