Subject: Re: [hackers-il] a comment is a comment is a comment?

From: "Alexander Maryanovsky" <[email-masked]>
Date: Wed, 09 Jul 2003 01:25:20 +0200

Well, this compiles with javac:

public class Test{

  public static void main(String [] args){
    System.out.println(/*Hello \u002a\u002f " World!");
  }

}

Not sure whether it qualifies as an unclosed comment, but it's always annoyed me that you couldn't write unicode escapes inside comments in Java (well, you could, but the results would sometimes be unexpected :-) )

Alexander Maryanovsky.

----- Original Message -----
From: Muli Ben-Yehuda <[email-masked]>
Date: Tue, 8 Jul 2003 22:22:27 +0300
To: Hack the Univec <[email-masked]>
Subject: [hackers-il] a comment is a comment is a comment?

> "Write[0] a C[1] program that will contain a comment which is not
> closed, which will compile cleanly, and which will give the wrong
> answer because the comment is not closed".  
> 
> [0] I was asked this question as an extra credit question in a class
> I'm taking, Algorithmics. Obviously, I won't be using any of the
> solutions (if any) mentioned here. But I've been butting my head
> against the wall for the last three hours, and I'm fairly convinced it
> can't be solved given a strict interpretation of the rules. 
> 
> [1] The original phrasing was "in either of C, C++, java or pascal". 
> -- 
> Muli Ben-Yehuda
> http://www.mulix.org
> http://www.livejournal.com/~mulix/
> 

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers