43 lines
1.1 KiB
Markdown
43 lines
1.1 KiB
Markdown
|
# HELL Basics
|
||
|
|
||
|
This page will show you basic usage of HELL.
|
||
|
|
||
|
# Prerequisites
|
||
|
|
||
|
It is assumed you have the HELL compiler installed. If not, you should probably go do that.
|
||
|
|
||
|
Having the vim syntax highlighting installed isn't necessary, but you'll look cooler with it, so go ahead and do that as well.
|
||
|
|
||
|
Make sure you have an extremely loud keyboard, preferrably blue switches. Its proven to make you a better programmer. If your keyboard isn't rupturing your eardrums with every keystroke, just give up honestly.
|
||
|
|
||
|
# First steps
|
||
|
|
||
|
Create a file called `helloworld.hell`.
|
||
|
|
||
|
Edit said file with a text editor (preferrably vim, you're a chud if you use anything else)
|
||
|
|
||
|
Import the ioutils header file (you could also do a typical #include \<stdio.h\> but thats not unnecessarily verbose, therefore not as fun)
|
||
|
```
|
||
|
import hell:std.ioutils
|
||
|
```
|
||
|
|
||
|
# Main function
|
||
|
|
||
|
Any functional HELL program requires a main function (unless you're writing libraries (why would you ever use this to write libraries lmao)), so you should probably make one
|
||
|
```
|
||
|
func
|
||
|
main()
|
||
|
{}
|
||
|
```
|
||
|
|
||
|
# Writing to stdout
|
||
|
|
||
|
Its pretty easy I guess.
|
||
|
```
|
||
|
func
|
||
|
main()
|
||
|
{
|
||
|
hell:std.ioutils.writeln("Hello\n");
|
||
|
}
|
||
|
```
|