summaryrefslogtreecommitdiff
path: root/examples/example0.luma
blob: 8a7f9c8ee2ed0677ac4433842829931f7cf38aac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
\ '\' defines single-line comments.
\<
	'\<' followed by '\>' defines multi-line comments.
	The contents of multi-line comments must be indented.
	Indentation is always a tab in Luma.
\>
\ Modules are automaticly imported by the interpreter.
\ Modules are folders with source code. Each source file contains the definition of the name of the file.
\ /gfx/win_t (example module) will be defined in the file win_t.luma which itself is inside the gfx folder.
\ This makes is easy for the interpreter to find the definitions. Therefore, each file in a module must only contain one definition.
\ This has the drawback of making single-file programs impossible if they want to utilize non-centralized modules.
\ A fix to this is to put the source files in an archive (like a Tarball), which is already a standard thing to do.
\ Define variable main of type void_t as function that doesn't return.
void_t:main -fn [] -noret
	// Use '$' followed by a dozenal number to
	/std/fout "1 + 1 = $0" (#1 + #1)
	exit