Saturday, July 31, 2010

[android-developers] Re: Android preprocessor, //#ifdef...

On some development systems a C preprocessor has been hijacked to
preprocess Java code. It's not standard, though.

You can use final constants in Java to select pieces of code. Eg, "if
(MY_CONSTANT) { ... }" where MY_CONSTANT is a "final" boolean value.
The Java compiler is defined to compile these on or off at compile
time, eliminating any runtime checks. However, the code in a
"deactivated" if leg still needs to be legal Java with variables that
exist, etc.

On Jul 31, 3:00 pm, sblantipodi <perini.dav...@dpsoftware.org> wrote:
> ah ah... it's incredible...
> I develop on Windows Mobile, JavaME, Bada, Blackberry, Symbian.
> I can use preprocessing on every platform...
> How can you develop on a mobile without preprocessing? Sure android is
> really good for fart app,
> but what else?
>
> I don't want to troll but I really can't understand why I heard many
> developers saying "viva android" when
> google released the first buggy SDK.
>
> On Jul 31, 8:22 pm, TreKing <treking...@gmail.com> wrote:
>
> > On Sat, Jul 31, 2010 at 10:25 AM, sblantipodi
> > <perini.dav...@dpsoftware.org>wrote:
>
> > > is there some sort of preprocessing in eclipse using android?
>
> > No.
>
> > > I haven't understood if this is a lack of netbeans or it is a lack of
> > > android.
>
> > It's a lack of Java. Preprocessing, specifically the #ifndef notation you
> > mention, is a C/C++ thing.
>
> > -------------------------------------------------------------------------------------------------
> > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> > transit tracking app for Android-powered devices

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate