I have been looking at some code used in the following example code Arduino Playground - Email and can't find any reference to what is the proper method to be used to document what appears to be a function/subroutine as follows:
byte sendEmail()
{
byte thisByte = 0;
byte respCode;
if(client.connect(server,25) == 1) {
Serial.println(F("connected"));
} else {
Serial.println(F("connection failed"));
return 0;
}
now to me I would usually specify a function / sub-routine by starting off with say 'void sendEmail()'
but when I have tried replacing 'byte' with 'void' it does not compile.
Could someone please explain what the line commencing 'byte...' is really trying to specify ???
I can see that this subroutine is possibly returning a value of '0' or '1' depending on the result of the code running so possibly it is just defining a 'byte' by the name of sendEmail BUT I'd like to see a reference to how it should be used. There is nothing in arduino.cc/reference
Regards all