procedure Mean.
number of marks=0
total=0
Do while You're still got marks
Get mark
Number of Marks=Number of marks+1
Total= Total+mark
End while
Average= total/numbermarks
End
Showing posts with label procedures. Show all posts
Showing posts with label procedures. Show all posts
Sunday, 20 March 2011
Wednesday, 16 March 2011
Procedures and functions.
What is a procedure?
A procedure is a seperate section of code which performs one or more specific tasks and is identified by having a name.
Four types:
A procedure is a seperate section of code which performs one or more specific tasks and is identified by having a name.
Four types:
- Event
- Sub
- Function
- Property
Why use procedures?
- Avoid repeating code.
- Make the code more readable
- Help in debugging a program
- Use a procedure in other programs
- Pass parameters.
What is a function?
A procedure could be considered as something which is a set of commands which do not return a value.
Subscribe to:
Posts (Atom)