Here is how I updated a sketch I have (implements a web server to control relays in a stop light) to 1.0 while retaining backward compatibility
1) Replace every instance of "Client" with "EthernetClient"
2) Replace every instance of "Server" with "EthernetServer"
3) add this block near the beginning:
- Code: Select all
// make backwardly compatable
#if ARDUINO < 100
#define EthernetClient Client
#define EthernetServer Server
Step three is optional if you never need to have it compile in the older IDE.
My code already used client.print("some stuff to print"), always using quotes, instead of client.write() so there were no other changes to make. ymmv