Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Basic4ppc Wishlist Missing any feature?

Compiler Directives

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-28-2008, 09:59 PM
Senior Member
 
Join Date: May 2007
Posts: 125
Default Compiler Directives

Is there any possibility of adding compiler directives to compile certain statements if a MACRO type definition is defined? E.G. like in C:
#define num 1
#if num
// Compile This Code
#else
Compile This Code
#endif

It would help for projects that have debugging statements throughout the program, and if a symbol is not defined, (or macro) then the statements are NOT compiled. What do you think?
Reply With Quote
  #2 (permalink)  
Old 09-28-2008, 10:50 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

That would render tha code a bit too complex for us who DON'T know C....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #3 (permalink)  
Old 09-28-2008, 11:01 PM
Senior Member
 
Join Date: May 2007
Posts: 125
Default

Hi. It could somehow be implemented, not like C, but in such a way that we could have code compiled based on optional conditions. E.G. Let's say I have a program with some debug code, and I want this code removed before building the release executable. Rather than look through the code for all debug statements, if a variable, one that I choose, isn't defined then code in between the special conditional statements won't be included in the program. This will make executables faster as the program won't have to check if a variable is set to true or false at runtime, but instead it checks the conditions at compiletime, thus excluding any code when compile conditions are false. Make sense anyone?
Reply With Quote
  #4 (permalink)  
Old 09-28-2008, 11:44 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

you mean like a [debug] some debug coding [/debug] tagging?
????
That would be good...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #5 (permalink)  
Old 09-28-2008, 11:54 PM
Senior Member
 
Join Date: May 2007
Posts: 125
Default

Exactly, But people could use it to have code included or excluded for various reasons, not just for compiling. HTH.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimizing Compiler Error? Louis Questions (Windows Mobile) 9 02-23-2009 08:09 PM
Compiler error CS1519 Filippo German Forum 3 07-16-2008 09:06 PM
Compiler error CS1519 mamuen Questions (Windows Mobile) 9 07-14-2008 05:41 AM
External compiler error prinsen Questions (Windows Mobile) 3 03-19-2008 08:54 PM
Inconsistant compiler result glook Questions (Windows Mobile) 3 03-04-2008 07:44 PM


All times are GMT. The time now is 12:52 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0