3

I'm used to Visual C++ which makes it very clear in an #ifdef block if the block is going to be compiled or not.

Does Xcode (3) do this too, I couldn't see how?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
  • What have you tried so far? [This SO question](http://stackoverflow.com/questions/367368/how-to-define-a-preprocessor-symbol-in-xcode) might help you a bit... – Alexander Pavlov Apr 28 '12 at 15:35
  • 1
    @AlexanderPavlov: I think the OP is talking about the greying out that VS does for blocks that aren't currently applicable, not how to define symbols. – Ry- Apr 28 '12 at 15:40
  • @minitech Oh I see, thanks, now that makes more sense to me. – Alexander Pavlov Apr 28 '12 at 15:42
  • @minitech correct. Ideally not just visually but by hovering over and it telling me the value or something like that. – Mr. Boy Apr 28 '12 at 19:07

1 Answers1

3

Have a look at the following screenshot.

enter image description here

As you can see, Xcode 4 does not apply syntax coloring in the parts that will not be compiled.

sch
  • 27,436
  • 3
  • 68
  • 83
  • True but if your code doesn't have syntax coloring, it doesn't help... a function call with parameters and no literals or datatypes mentioned. However if I'm unsure, I suppose I can add a dummy line of code like `int x = 123;` and see what happens! – Mr. Boy Apr 28 '12 at 19:06