HackVM Hello World

Post Reply
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

HackVM Hello World

Post 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!
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

i think you have a null character in the middle. try printing out the chars as digits to see it.
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post 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.
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

Post 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!
Post Reply