H (Hammy)
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
H is a programming language by User:Hammy which is like Python, C++ and some random junk thought up by the creator of the esolang mixed together. The file extension is .hpl, but strangely you have to use .hlb for libraries.
Why isn't the file extension .h?
Because C took that extension for headers.
Commands
Base rules
- A program is a bunch of functions. The function "main" is run first.
- It's object oriented (unlike Classese assasend objendclassese assasend objendtsend!, the creator actually knows what this means)
- It's cool
H 1.0: The beginning
- This section is still a work in progress. It may be changed in the future.
H 1.0 is the first version of H.[more info needed]
The basics
This is the form of a program:
! import htools/libraries/testing/hw.hlb # imports the library hw from the testing section of the official set of libraries
! import sysroot/win/c/users/hammy/cool stuff/coding/h/cat.hlb # imports the library cat from C:\Users\hammy\cool stuff\coding\h, but only if you're on windows (i am :D). the folder win can be replaced with mac for MacOS, lnx for linux or huh for anything else
! import htools/folderref/current/tm.hlb # imports the library tm from the curremt folder this program is in
def mix(void) { # example of defining functions that aren't main
hw.main();
cat.main();
tm.main();
} def main(void) {
this.mix(); # run function "mix" from this program
}
Output
Output is done with hout << "output";.
Comments
Comments are done by # single line for single-line comments and /# multiline #/ for multiline comments.
Variables
Variables are containers of values. They can be made using (type) (name);. A variable's name is valid if:
- it doesn't start with a special character
- it doesn't start with a number
- it doesn't start with __
- it doesn't contain spaces
So these are valid variable names:
H_is_the_best User:Hammy ÆÜĞH moneybill$
But these aren't:
esoteric programming language $$MONEY$$ __underscores__ 3pointonefourispi
Input
wip