// Putting it all together: a function with parameters and a return value void setup() { size(400,400); } void draw() { int x; x=addnumbers(1,2); // Call addnumbers and put the return value in x println(x); } // Function addnumbers takes two parameters (a and b) and returns their sum // Notice how the type of the function is now int, not void int addnumbers(int a,int b) { return a+b; // Get out of here and return the sum }