Skip to content

Functions

ccgauche edited this page Sep 21, 2020 · 1 revision

Functions

In cythan functions are immutable and global. In a lot of languages, a Cythan function would be named a macro. All functions are computed at compile-time.

Allowed function names: [a-z0-9_]+

To define a function

function_name {
	# function_code
}

To define a function you need to add brackets after the function name and write the code between them.

To execute a function

function_name(10 0)

Function arguments are written between parenthesis.

Clone this wiki locally