macro question

  • Thread starter Martin De Kauwe
  • Start date
M

Martin De Kauwe

Hi,

so I am translating some c++ code and I don't understand what the
following double hash tag means, I have never seen this before? Any
thoughts would be welcomed.

#define NCRAT(x) x##r= (x > 0.) ? x##n / x : 1e6

ps. I understand the conditional, I just don't get what two hashes
means.

Many thanks,

Martin
 
I

Ian Collins

Hi,

so I am translating some c++ code and I don't understand what the
following double hash tag means, I have never seen this before? Any
thoughts would be welcomed.

#define NCRAT(x) x##r= (x> 0.) ? x##n / x : 1e6

ps. I understand the conditional, I just don't get what two hashes
means.

Concatenation
 
H

Hubert Kleinheistermann

Am 04.02.2011 06:01, schrieb Ian Collins:
Concatenation

Yes, Concatenation.

NCRAT(schnerpel) will be expanded like this:

schnerpelr= (x> 0.) ? schnerpeln / x : 1e6
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top