Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Christmas poem since 1988

by truedfx (Monk)
on Dec 24, 2005 at 16:08 UTC ( #518911=note: print w/ replies, xml ) Need Help??


in reply to Christmas poem since 1988

Strict C compilers (tendra in default mode, gcc with -pedantic-errors) refuse to compile this, because while char v[]="..."; is valid, char v[]=("..."); is not. I haven't yet figured out what the third language is, if you don't mean C++, so I'm not sure if this breaks that, but my simple suggestion to resolve this is:

Instead of
#define q char w=0,v[]=
you can use
#define q(x) char w=0,v[]=x

It doesn't affect the output with less strict C compilers (gcc in default mode, icc), nor does it affect the output as a Perl script.

HTH

Update: I see now that the output is different when compiled as C++ instead of C ("only" instead of "true"), so it must be that that was what you meant.


Comment on Re: Christmas poem since 1988
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://518911]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2015-07-07 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls