Welcome to the Fusion-BASIC documentation. Fusion-BASIC is a new programming language designed to simplify coding with a focus on ease of use and readability.
Fusion-BASIC takes inspiration from Python and BASIC to make switching easier.
To install Fusion-BASIC, follow these steps:
RUN("scriptname.fbasic")
in the shell.Fusion-BASIC has a simple and intuitive syntax. Here are some basic functions:
PRINT("i will be displayed!")
and for variables you can use PRINT(text)
.#
VAR
keyword..fbasic
, .fbas
, or .fusion
as the file extension for your scripts.Here are some examples to get you started:
# Hello World in Fusion-BASIC VAR message = "Hello, World!" PRINT(message)
# Variables in Fusion-BASIC PRINT("what is your name?") VAR name = INPUT() PRINT("what is your age?") VAR age = INPUT_INT() PRINT("Name:") PRINT(name) PRINT("Age:") PRINT(age) PRINT("End of script...")
# This is a script written by David Callanan # this script adds 'oop' at the end of every word! feel free to customize this. FUN oopify(prefix) -> prefix + "oop" FUN join(elements, separator) VAR result = "" VAR len = LEN(elements) FOR i = 0 TO len THEN VAR result = result + elements/i IF i != len - 1 THEN VAR result = result + separator END RETURN result END FUN map(elements, func) VAR new_elements = [] FOR i = 0 TO LEN(elements) THEN APPEND(new_elements, func(elements/i)) END RETURN new_elements END PRINT("Greetings universe!") FOR i = 0 TO 5 THEN PRINT(join(map(["l", "h"], oopify), ", ")) END