Page 1 of 1

HackVM Hello World

Posted: Mon Jan 05, 2009 4:05 am
by megabreit
Hi there,

I wrote a hackvm program in the java script env that displays 'Hello, World' .

When I enter the code on the web page I get the "error" Expected: 'Hello, World', got: 'Hello, World'.
But even in HTML source code it's both the same.

What's wrong here?
There are serveral ways of coding this... is only one valid?

Thanks!

Posted: Mon Jan 05, 2009 5:21 am
by adum
i think you have a null character in the middle. try printing out the chars as digits to see it.

Posted: Mon Jan 05, 2009 2:32 pm
by MerickOWA
I've discovered that accidnetly printing out '\0' (null) characters is a very common reason if your text appears to be identical.

Firefox's "view source" on the error message page is very good about showing these characters so that you can tell where they're getting printed.

Posted: Tue Jan 06, 2009 12:38 am
by megabreit
It was not a \0 but another unprintable character which (surprisingly) was not displayed
with "View source"... I copied the error message directly from the "view source" window
to my posting... strange :? anyway, it's working now.

Thanks for pointing me to the right direction!