Hellope World
This is the source code for the tradition _Hello World _program.
// This is a comment, which is ignored by the compiler
#import "fmt.odin"; // This is an importation of a file which will be explained later
// This is the main procedure, the entry point for this program
main :: proc() {
// The statements here will be executed when the compiled binary is executed
// Print text to the console
fmt.println("Hellope, world!);
}
println
is a procedure which is defined the core library file fmt.odin
.
A binary can be made using the Odin compiler:
E:\ odin build hello.odin
This will produce a hello.exe
executable.
E:\ hello.exe
Hellope, world!
A binary can be generated and immediately execute with run
E:\ odin run hello.odin
Hellope, world!