Download presentation
Presentation is loading. Please wait.
1
Passing Arguments Question Example: IS1102 Exam Autumn 2001
3
Break it down 2 Variables declared at module level [General Declarations] cmdCalculate_Click (Event Procedure) Display (Sub Procedure) AddNum (Sub Procedure) IncrementNum (Function Procedure – returns a value)
4
Begin with event procedure (user click) Assigns values to variables Makes Calls to Procedures and Functions
5
AddNum Procedure: Watch out for argument (in brackets) Makes call to the function procedure (IncrementNum) Makes call to sub procedure (Display)
6
Function Procedure (IncrementNum) Changes variable values (watch out for local Vs module variables) Value is returned (IncrementNum)
7
Prints to Picturebox Watch out for NewNum (receiving passed value) If Statement checks value of Num4 and statements executed depending on result
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.