Preprocessor directives explained

The preprocessor syntax has been changed in NetBeans Mobility Pack 5.0. It is more readable now. The syntax is like c++ macros now. Do you remember #ifdef, #ifndef ? Yes, it's back ;) There is code completion for creating a preprocessor directive. Abilities can have a value. You can check the value in the preprocessor block directive. You can create nsted blocks too. Lot of improvements from previous versions.
The preprocessor syntax is Antenna compatible. You can easily import code from Antenna to Mobility Pack and it should work.

Maybe you are asking what is it all about? Why a preprocessor?
I already explained it in my previous post almost year ago... In one sentence - the preprocessor helps us to solve device fragmentation.

There is new article explaining all the new directives of preprocessor in 5.0. Enjoy it
Comments:

Are there any chances for more preprocessor features? It would be very nice to preprocess also variables which values are defined in external file. I mean something like that: //#include "file" int func() { //#if $variable != 0 //# return $variable; //#else return 0; //#endif } where for example value 'variable=5' is defined in included file

Posted by Raid on May 04, 2006 at 06:56 AM CEST #

Is there any way to change automatically from the old to the new syntax for a whole document?

Posted by Marek on January 05, 2007 at 02:16 AM CET #

There is no need to change the old syntax to the new one therefore there is no action for the whole document. The preprocessor will work with the old syntax without any problems.

Posted by Lukas on January 05, 2007 at 02:25 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This is the main channel to share news, tips and other stuff related to my work. Sometimes you can find even personal stuff. Enjoy your reading...

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
news
Blogroll

No bookmarks in folder

OldNews
MyTrash
NavBar
NetBeans
LinksToBeExpanded