From 8928d0f7a4015f64582b26748f7028a55f1d36f1 Mon Sep 17 00:00:00 2001 From: Liam Waldron Date: Tue, 5 Dec 2023 09:59:13 -0500 Subject: [PATCH] add docs --- docs/basics.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/basics.md diff --git a/docs/basics.md b/docs/basics.md new file mode 100644 index 0000000..4402579 --- /dev/null +++ b/docs/basics.md @@ -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 \ 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"); +} +```