I am currently writing my own programming language, mainly for educational purposes.
When writing a simple hello world example, I realised that many programming languages take the following form:
write "hello world" to the console
return 0
- Do all programs have to return an integer somehow?
- Do those that don't explicitly require you to state a return value implicitly return 0 anyway?
- Does this change between popular operating systems based upon Windows NT, Linux Kernel or Mac OS Xs kernel?
- If so, why?
I am unsure what to tag this question as, any help is appreciated of course.