Hello++

From Esolang
(Redirected from Hello Plus Plus)
Jump to navigation Jump to search

Hello++ or Hello Plus Plus is an improvement to the Hello programming language, created by Propeng on Sunday, the 14th of March, 2010 at about 6 PM GMT.

Hello++ will print out "Hello World" whenever it encounters 'h' or 'H'. It ignores all other characters silently.

Quine

Unlike the original Hello, it is possible to produce a Quine using Hello++.

 Hello World

Compiler

There is a Hello++ compiler in C# here.

Interpreter

And you can't forget Zayne's interpreter. It's an improved version of his Hello interpreter

 i = input("Enter Command: ") 
 if i != 'h':
 	if i != 'H':
 		print("")
 	if i == 'H': 
 		print("Hello World")
 else:
 	print("Hello World")

And also, you can't forget User:A's interpreter. It is written in C:

#include <stdio.h>
int main()
{
     char i;
     i=getchar();
     if(i=='h'||i=='H')printf("Hello World");
     return 0;
}

Also, modified Python interpreter:

i=input(">")
if i=='h' or i=='H':
   print("Hello World")

User:Cortex's interpreter written in ProcessingJS:

var hello = function(x) {
    for(var i = 0; i < x.length; i++) {
        if (x.charAt(i) === "h" || x.charAt(i) === "H") {
            println("Hello World");
         }
     }
};

Oh, here's a codegolfed Python 3 interpreter by Spexty (49 bytes):

i=input()
if i=='h'or i=='H':print('Hello World')

Here's the same thing for Python 2, except now you have to put quotes around the input (47 bytes):

i=input()
if i=='h'or i=='H':print'Hello World'

Again Python 2, but this time you don't have to put quotes around the input (51 bytes):

i=raw_input()
if i=='h'or i=='H':print'Hello World'

Here's a shorter one for Python 3 by User:PythonshellDebugwindow (38 bytes):

if input()in 'Hh':print('Hello World')

Here is /// version of Hello++ writen by ChuckEsoteric08

/!/#//#/Hello World /!

This Uses ! as a program. This interpreter is uses # instead of H.

This interpreter in Gray Snail only works if the input is "h" or "H", so it can't make quines.

INPUT ?
GOTO is_h H [?]
GOTO is_h h [?]
OUTPUT "Error"
GOTO end a a
is_h
OUTPUT "Hello World"
end

Meanwhile, this one works if the input is "Hello world", so it can make quines.

INPUT start
POP ? start [start]
GOTO is_h h [?]
GOTO is_h H [?]
OUTPUT "Error"
GOTO end a a
is_h
OUTPUT "Hello World"
end

It is interpreter in REALScript:

new a new b input #a !label run letter b #a if #b H say if #b h say goto run !label say print Hello_World goto run

Here is a code-golfed interpreter written in ProcessingJS by user User:Harumafuji Kohei:

function hello(x) {
   for(var i in x)
       if (x[i].toLowerCase() === 'h')
           println("Hello World");
}

See Also