(SOLVED) Pragma Compiler Directives for IDE 1.0

I was wondering if anyone has come up with some pragma compiler directives, so we can write or modify old code without maintaining multiple versions of the code that we write. I have searched this forum, with no luck. But as with all Forums, it is hard to find information sometimes. I think if we could solve this issue, the community could be informed how to write code more efficiently to cover both streams.

For instance, the wire library has changed some methods, and I would like my #defines to be able to identify and change the code for both the old and new methods using pre-compiler directives, possibly through pragma data.

Any other suggestions on how to handle this issue are also welcome.

Thanks in advance for your advice.

something like:

#if ARDUINO >= 100
#include <EthernetUdp.h>
#include <UDP.h>

#if ARDUINO >= 100
#include “Arduino.h”
#include “WProgram.h”

Thanks for the reply, I also have seen this type, but have not tried yours or this yet, but I know this will solve the issue. It was the ARDUINO value I needed to be able to create Pre-Complier solutions.

// Arduino 1.0 compatibility

if defined(ARDUINO) && ARDUINO >= 100

include "Arduino.h"


include "WProgram.h"