Go Down

Topic: Weakness on "Language Comparison" Page (Read 575 times) previous topic - next topic


The Arduino/Processing Language Comparison page (http://www.arduino.cc/en/Reference/Comparison) suggests that in making an Arduino loop we must use this syntax:

[font=Courier]int i;
for (i = 0; i < 5; i++) { ... }

as compared to Processing, which embeds the index variable declaration within the loop definition:

[font=Courier]for (int i = 0; i < 5; i++) { ... }

This distinction is not strictly correct, as either usage is perfectly valid in Arduino (and C++).  I think both are valid in Java as well, and probably in Processing too.  This section is misleading and should probably be removed.



Aug 12, 2008, 09:01 am Last Edit: Aug 12, 2008, 09:02 am by mem Reason: 1
Quite right.  

And there are some differences that may be worth mentioning, such as :
* The size of the data types is different, so for example integer code that works in processing may overflow on the arduino
* Java has no preprocessor,  so Arduino code using #defines (or macros) need to be re-coded
* Creation of  types using 'new' is not supported on the arduino (it is in C++ but not the version used by the Arduino)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131