return \ Language (API) \ Wiring ALPHA 1.0
Search wiring.org.co:
Language (A-Z) \
Libraries \
Environment \
Learning \
Hardware
Reference for Wiring version 0027+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name
return
Examples
int val = 30;
void setup() {
Serial.begin(9600);
}
void loop() {
int t = timestwo(val);
Serial.println(t); // prints 60
}
int timestwo(int dVal) {
dVal = dVal * 2;
return dVal;
}
Description
Keyword used to indicate the value to return from a function. The value being returned must be the same datatype as defined in the function declaration. Functions declared with void can't return values and shouldn't include a return value. The keyword return may also be used to break out of a function thus not allowing the program to read the remaining statements (see the third example above).
Syntax
typefunction {
statements
return value
}
Parameters
type
boolean, byte, char, int, float, String, boolean[], byte[], char[], int[], float[]
function
any function that is being defined
statements
any valid statements
value
must be the same datatype as the type parameter
Usage
Application
Updated on September 16, 2010 09:16:47pm PDT
Wiring is an open project initiated by Hernando Barragán. It is developed by a small team of volunteers.
© Info, Processing © Info
Wyszukiwarka
Podobne podstrony:
function returnfunction mcve returnstatusreturn?rMonitoring the Risk of High Frequency Returns on Foreign ExchangeAlanis Morissette You owe me nothing in returnThe Bodyguard s ReturnReturnreturn74 Return to Jordan Pinkfunctions returning valuesVI Return Of The Jedi[1983]DvDrip aXXoPowrót zabójczych pomidorów Return of the Killer Tomatoes (1988) NapisyPLfunctions returning valuesBoosting Returns New Twists to Time tested Trading Techniques with Tom GentileDragon Ball Yo! Son Goku and His Friends Return!functions returning valuesremove returnsLacy Collison Morley The Power of the Dead to Return to Earthwięcej podobnych podstron