OOP support

hi all, i've not been working with the arduino for more than a week or so... i'm curious if the wiring language has support for oop principles?... i've seen some syntax that seems to suggest that the language is at least object based, however i've had no luck in finding that sample again and i can't seem to find anything on the wiring website... the website only states:

... doesn't require users to understand more advanced concepts like classes, objects, pointers..., and the "more" link isn't pointing anywhere...

however, i'm pretty sure that the code sample i saw used the "new" keyword to create a new instance of some class...

thanks!

some arduino libraries are based on classes/objects. the syntax (standard c) should be available in simple sketches as well. haven't tried it though.

regards,
kuk

Hi,

the system is C++ based, using avr-gcc, and within reason you can use any standard feature of the language. Remember that you're programming a limited machine and not a modern desktop machine though..!

Charlie

hey idover,

the arduino does support OOP! i've created a few libraries for it here: http://svn.reprap.org/trunk/users/hoeken/arduino/library/

there is also a tutorial on creating your own libraries here: http://www.arduino.cc/en/Hacking/LibraryTutorial

its a bit tricky, but i'm really enjoying OOP on the arduino =)