🛠️Setting Up infLang
To run code using infLang you should have the .exe c# app and the main infLang file in the same folder or use {Starting.exe app file path \newPath\filename.inf
🚀 Execution Entry Point
func main
{
say("Starting program...")
call greet
}
If the main
function is not found, execution will halt with an error.
Examples
📄 File main.inf :
// Global variables
num score = 95
//Imports
import lib\utils
import hello
func main
{
//Local variables
string name = "Alice"
say("Welcome, {name}!")
call greet
call hello
say("You scored {score} points.")
}
📄 File : lib\utils.inf ( located in folder lib relative to the starting file
func greet
{
say("Hello from utils!")
}
📄 File : hello.inf
func hello
{
say("Hello world!")
}
🖥️ Output:
Welcome, Alice!
Hello from utils!
Hello world!
You scored 95 points.
Last updated