When you say 'return' you presumably mean the two arguments must be integers; not that the function returns integers. So:
Code:void setup() {
size(10,10);
// call the function:
myFunction(4,2);
}
// function definition:
void myFunction(int firstArg, int secondArg) {
println(firstArg);
println(secondArg);
}
The keyword 'void' just means the function doesn't return a value. You follow that by the function name and then open a bracket. Then you add your arguments. Each argument should be preceded by the type that is expected (e.g. int, float, String, boolean, Object etc) and arguments are separated with commas. You then close the bracket and open a curly brace and finally close the function with a closing brace. You can then reference the value of the arguments between the function's braces (and do stuff with them) using the argument names.
Now if you did want your function to return a value you replace 'void' with the type that the function returns and then must include a return statement that uses the appropriate type. For example:
Code:void setup() {
size(10,10);
// call the function:
println(myFunction(4,2));
}
int myFunction(int firstArg, int secondArg) {
return firstArg+secondArg;
}