I have a sketch with this line in it
void httpGet(String ip, String path, int port=80);
And after reading this thread.....
http://forum.arduino.cc/index.php?topic=215085.0
I'm still not sure the point or purpose of that line in the sketch
What use does this line serve in ANY sketch?
system
November 29, 2018, 3:18pm
2
It's a function prototype with one defaulted argument.
gfvalvo
November 29, 2018, 3:18pm
3
The answer would be in the source code for the httpGet() function, which you have access to.
Edit:
Oops, my bad. Missed the variable types in the parameter list. It is a prototype. But, answer is still the same, look at the function's source code.
Excellent and thanks.
Now that I know it's called a "Function Prototype" I can do my research.
Found this,,,,
In computer programming, a function prototype or function interface is a declaration of a function that specifies the function’s name and type signature (arity, data types of parameters, and return type), but omits the function body. While a function definition specifies how the function does what it does (the "implementation"), a function prototype merely specifies its interface, i.e. what data types go in and come out of it. The term "function prototype" is particularly used in the context of t...