Function to Return a Value?


i want make function(or whatever) returns value. mean want able like:
code: [select]
if(function == value) {  //or "function() == value"??
 
}

i know set variable equal in said function, think cleaner...

the way intend make function following syntax:
code: [select]
function void() {
  value returned function generated here...
}

is possible somehow? have no formal training programming, starting better. appreciated.

thanks.
pat

just use return statement:

code: [select]
int function() {
   return 12;
}


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Function to Return a Value?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums