Under Private create the functions signature:
- Give the function a name that is not a reserved word - Function Gender
- Add parameters as needed starting with a p with their data types - Function Gender(pID:string)
- Add the Function's output data type to the end - Function Gender(pID:string): string;
- Push <Ctrl><Shift><c> to create the skeleton code
In the skeleton code:
- Code what your function should to.
- Remember result needs a value.
- You can use result as a variable, you do not need another local variable to hold the value of result first.
- The result must match the data type of the function - in this case string. The result can be any data type.
- You can use the parameter and do not need to assign it to a local variable.
- Functions may have their own local variables.
- Functions should NOT access objects on the form. Parameters should be used to pass values.