ARDUINO C

Hi all

How far is the ARDUINO C sytax from the "regular" C
like KEIL C for example .

Th reason I ask is because I wonder about a newbe to ARDUINO
when he learns by practice the ARDUINO C , how hard it will be to him
when he will need to do some work with other controllers like 8051
with KEIL compiler for example .

Thanks
Elico

elico:
How far is the ARDUINO C sytax from the "regular" C

It as far from "regular" C as "regular" C is from "regular" C++.

The arduino language is really c++. I worked my way thru a c/c++ tutorial nook running the examples on the arduino. The biggest things i noticed were the use of setup/loop instead of main and the lack of standard stream i/o on the arduino.

the use of setup/loop instead of main

They're in addition to main, not instead of.

AWOL:

the use of setup/loop instead of main

They're in addition to main, not instead of.

Actually the Arduino library contains a main.cpp which contains a main which calls setup and loop.

#include <Arduino.h>

int main(void)
{
	init();

#if defined(USBCON)
	USBDevice.attach();
#endif
	
	setup();
    
	for (;;) {
		loop();
		if (serialEventRun) serialEventRun();
	}
        
	return 0;
}

Delete the file and you have to program your own main.
Best regards
Jantje