Skip to main content
C3 Tutorial
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Functions

Functions in C3 are declared the same way as in C with the addition of the fn keyword.

import std::io;

fn void test(int x)
{
	io::printfn("%d", x);
}

fn void main()
{
	test(100);
}