Skip to main content
added 125 characters in body
Source Link
Majenko
  • 105.5k
  • 5
  • 80
  • 138

It does threefour things, basically:

  1. It adds #include <Arduino.h> to the top of your file, which gives you access to all the classes, functions and defined variables/macros of the API.
  2. It joins together all the INO files together into a single monolithic file (in the same order as the tabs in the window),
  3. It matches #include entries with libraries and adds the files in those libraries to the list of files to compile, and
  4. It scans through the ino file(s) looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

It does three things, basically:

  1. It adds #include <Arduino.h> to the top of your file, which gives you access to all the classes, functions and defined variables/macros of the API.
  2. It matches #include entries with libraries and adds the files in those libraries to the list of files to compile, and
  3. It scans through the ino file(s) looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

It does four things, basically:

  1. It adds #include <Arduino.h> to the top of your file, which gives you access to all the classes, functions and defined variables/macros of the API.
  2. It joins together all the INO files together into a single monolithic file (in the same order as the tabs in the window),
  3. It matches #include entries with libraries and adds the files in those libraries to the list of files to compile, and
  4. It scans through the ino file(s) looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

added 7 characters in body
Source Link
Juraj
  • 18.2k
  • 4
  • 30
  • 49

It does three things, basically:

  1. It adds #include <Arduino.h> to the top of your file, which gives you access to all the classes, functions and defined variables/macros of the API.
  2. It matches #include entries with libraries and adds the files in those libraries to the list of files to compile, and
  3. It scans through the ino file(s) looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

It does three things, basically:

  1. It adds #include <Arduino.h> to the top of your file, which gives you access to all the classes, functions and defined variables/macros of the API.
  2. It matches #include entries with libraries and adds the files in those libraries to the list of files to compile, and
  3. It scans through the file looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

It does three things, basically:

  1. It adds #include <Arduino.h> to the top of your file, which gives you access to all the classes, functions and defined variables/macros of the API.
  2. It matches #include entries with libraries and adds the files in those libraries to the list of files to compile, and
  3. It scans through the ino file(s) looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

added 126 characters in body
Source Link
Majenko
  • 105.5k
  • 5
  • 80
  • 138

It does twothree things, basically:

  1. It adds #include <Arduino.h> to the top of your file, which gives you access to all the classes, functions and defined variables/macros of the API.
  2. It matches #include entries with libraries and adds the files in those libraries to the list of files to compile, and
  3. It scans through the file looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

It does two things, basically:

  1. It adds #include <Arduino.h> to the top of your file
  2. It scans through the file looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

It does three things, basically:

  1. It adds #include <Arduino.h> to the top of your file, which gives you access to all the classes, functions and defined variables/macros of the API.
  2. It matches #include entries with libraries and adds the files in those libraries to the list of files to compile, and
  3. It scans through the file looking for functions and adds prototypes to them to the top of your file.

It's the latter that can cause problems. Historically it never got the prototypes in the right place, and if you ever passed a structure of your own devising to a function it would break horribly. It does a better job these days, but it's still not 100% perfect.

It basically means that you don't have to adhere to the "You must define it before you use it" rule of C/C++. Which of course makes for lazy programmers.

Source Link
Majenko
  • 105.5k
  • 5
  • 80
  • 138
Loading