Notions of the Nectar Primer.
Author: Amlal El Mahrouss (amlal at nekernel dot org)
Abstract:
Low-Level large systems are one of the thoughest aspects of Software Engineering.
Nectar was designed to implement such system in a way that the programmer has the guarantee to know and design the system up to their wishes.
Nectar is simple to use, compiled to binary -- and works on NeKernel and POSIX platforms.
Requirements:
You will need to install:
- NeBuild
- CoreUtils
- Git
- MinGW/Clang
Hello Nectar!
Consider the following program:
let main()
{
writefn("%s:13", "Hello, world!\n");
return;
}
The following prints out 'Hello World' with a maximum buffer size of 13.
Now -- consider this:
let main()
{
let bar := "Hello, world\n";
writefn("%s:13", bar);
return;
}
You now know how to write a variable in Nectar.
We should make it constant though:
let main()
{
const bar := "Hello, world\n";
writefn("%s:13", bar);
return;
}
Way better!