BIT116: Scripting Functions
Today Quiz Function calls – collect, call, receive Function calls – accumulator practice
Basic Functions: Collect, Call, Receive The event handler will collect the data from the form The event handler will then call the function (passing in that data) The event handler will get the return value Let’s look at Collect_Call_Receive.html
Do Exercises Work on Exercises #1 and #2 for this part of this lecture
Defining a New Function (Collect, Call, Receive) Template: collect, call, receive Have event handler collect up data Pretend the function exists already and call it from the event handler Set up the function definition Focus on what parameters to include Put a comment above the function describing what it does, and what it returns Fill in the function’s logic Return the result from the function back to the event handler Receive the result in the event handler and do something with it.
Do Exercises Work on Exercise #3 for this part of this lecture