Pages: [1]   Go Down
Author Topic: Weakness on "Language Comparison" Page  (Read 342 times)
0 Members and 1 Guest are viewing this topic.
Austin, TX USA
Offline Offline
God Member
Karma: 5
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino/Processing Language Comparison page ( suggests that in making an Arduino loop we must use this syntax:

int i;
for (i = 0; i < 5; i++) { ... }

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

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.


Offline Offline
Tesla Member
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
« Last Edit: August 12, 2008, 02:02:32 am by mem » Logged

Pages: [1]   Go Up
Jump to: