Quick start
This quick start page introduces the basics of writing and running your first program in Cambo. The goal is to establish a clear foundation so you can understand how programs are organized and begin to develop more complex applications.
Hello World!
A "hello, world!" program is simple program that prints the message "hello, world!" to the screen, typically in a terminal or console. It's traditionally the first program written when learning a new programming language.
To begin, create a file with .kh extension using your prefered code editor. This file will contain your program's source code.
Like many programming languages, Cambo has a defined entry point called main function, which serves as the starting point of the program execution.
You can copy and paste the following code into your file.
int main(string args[]){
print("hello, world!");
return 0;
}
Then, compile the program using the following command:
cambo main.kh
Cambo compiler will generate an executable named a.out, which you can then run
./a.out
Finally the phrase hello, world! will be printed in your teminal
hello, world!
main.kh.