| | Re: Programming Brain Teaser Richard Marchetti
|
| | (...) Yeah, and maybe I am going to have to kick this guy until he is dead. His solution was: printf("abcdefghijkl...tuvwxyz"); // ;("abcdefghijklmnopq...yz")ftnirp Which I would like to point out doesn't print anything in the second instance (...) (24 years ago, 7-Sep-00, to lugnet.off-topic.geek)
|
| | |
| | | | Is it perl or C? (was: Re: Programming Brain Teaser) David Eaton
|
| | | | (...) Here's one that's MUCH better-- 'course most of you may have seen this already... someone made code equivalent to UNIX's wc command that can be compiled and run the exact same in perl and C... this one was really clever: (Grrr, it's gonna put (...) (24 years ago, 7-Sep-00, to lugnet.off-topic.geek)
|
| | | | |
| | | | | | Re: Is it perl or C? (was: Re: Programming Brain Teaser) Tobias Möller
|
| | | | | When looking at this, I can't believe I actually wanted to learn how to program ^-^ I thought it was much more simple, like AppleScript or the POV-ray scene description language. --Tobias David Eaton wrote: <SNIP> (...) (24 years ago, 13-Sep-00, to lugnet.off-topic.geek)
|
| | | | | |
| | | | | | | Re: Is it perl or C? (was: Re: Programming Brain Teaser) David Eaton
|
| | | | | (...) Well, this is an example of horrific code, because it was purposely written so that it would parse, compile, and run in two different languages ... actual C code or Perl code is usually much nicer to look at and understand. BUT, let it be said (...) (24 years ago, 13-Sep-00, to lugnet.off-topic.geek)
|
| | | | | |
| | | | Re: Programming Brain Teaser Jude Beaudin
|
| | | | In lugnet.off-topic.geek, Richard Marchetti writes: <snip> (...) <snip> Yikes!!! Programmers are way too serious. I have heard of not being able to take a joke, but come on... :-) Jude (24 years ago, 7-Sep-00, to lugnet.off-topic.geek)
|
| | | | |
| | | | Re: Programming Brain Teaser Matthew Miller
|
| | | | (...) 'Course, that's not legal C.... (24 years ago, 7-Sep-00, to lugnet.off-topic.geek)
|
| | | | |
| | | | | | Re: Programming Brain Teaser David Goeb
|
| | | | (...) Not even legal Perl and he did say Perl. Only works in C++ or in a C with C++ extentions. Kick him twice as much. And (MattM) you may be right that the ; alone is to taking a liberty with the term statement. DaveG (24 years ago, 8-Sep-00, to lugnet.off-topic.geek)
|
| | | | |
| | | | | | Re: Programming Brain Teaser David Eaton
|
| | | | (...) ;("abcdefghijklmnopq...yz")ftnirp (...) 'Course, if ';' doesn't count as a statement, it makes it much more difficult, since most commands end with a ';', and therefore have to start with one as well if they're to be read in backwards-- making (...) (24 years ago, 8-Sep-00, to lugnet.off-topic.geek)
|
| | | | |
| | | | | | Re: Programming Brain Teaser David Goeb
|
| | | | (...) Good one, works in perl, C, and C++ You win in my opinion. (...) What a nasty addition to the problem. Gonna have to think about it... DaveG (24 years ago, 8-Sep-00, to lugnet.off-topic.geek)
|
| | | | |
| | | | | | Re: Programming Brain Teaser Matthew Miller
|
| | | | (...) Yeah, I thought of that one, but I'm not sure it counts as a statement. In perl, of course, it's a comment. And in C/C++, it's a preprocessor directive.... (...) Well, #define thisisnotapalindrome enifed# :) (24 years ago, 8-Sep-00, to lugnet.off-topic.geek)
|
| | | | |
| | | | | | Re: Programming Brain Teaser David Goeb
|
| | | | (...) You got it right again you punk<grin>, Page 616:Programming Perl O'Reilly: Statement- A *command* to the computer about what to do next....Not to be confused with a *declararation* which doesn't tell the computer to do anything, but just learn (...) (24 years ago, 8-Sep-00, to lugnet.off-topic.geek)
|
| | | | |