Vote UpVote

#ifdef, redefined

RemObjects Blogs – Using #ifdefs, or your language's equivalent, is a common occurrence in code, not only when writing cross-platform code. #ifdefs (or #if in C#, Swift and Iodine and {$IF} in Oxygene), let you conditionally compile different parts of your project — for example to account for APIs not available on all platforms, or for code you want to run only in debug or in release mode. The downside is, #ifdefs make for pretty ugly code: #if COCOA var formatter = new Foundation.NSDateFormatter(); formatter.dateFormat = format; formatter.timeZone = timeZone; return formatter.dateFromString(value); #endif #if ...
Favorite? Off-Topic? marc hoffman @ 2017-12-21 20:01


Visits: 11419
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)