This commit is contained in:
Liam Waldron 2023-12-05 09:59:13 -05:00
parent 3c441fd6c1
commit 8928d0f7a4

42
docs/basics.md Normal file
View File

@ -0,0 +1,42 @@
# 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");
}
```