Page 109 - Open Soource Technologies 304.indd
P. 109
Open Source Technologies Sarabjit Kumar, Lovely Professional University
Notes Unit 7: Functions
CONTENTS
Objectives
Introduction
7.1 User-Defined Functions
7.2 Function Scope
7.3 Returning Values By Value
7.4 Returning Values By Reference
7.5 Declaring Function Parameters
7.5.1 By-Value Parameters
7.5.2 By-Reference Parameters
7.6 Default Parameters
7.7 Static Variables
7.8 Arrays
7.8.1 Array ( ) Construct
7.8.2 Accessing Array Elements
7.8.3 Modifying/Creating Array Elements
7.8.4 Reading Array Values
7.8.5 Accessing Nested Arrays (or Multi-Dimensional Arrays)
7.8.6 Traversing Arrays Using Foreach
7.8.7 Traversing Arrays Using List( ) and Each( )
7.8.8 Reset( )
7.8.9 Each( )
7.8.10 List( )
7.8.11 Additional Methods for Traversing Arrays
7.9 Objects
7.9.1 Creating an Object
7.9.2 Object Inheritance
7.10 Summary
7.11 Keywords
7.12 Self Assessment Questions
7.13 Review Questions
7.14 Further Reading
104 LOVELY PROFESSIONAL UNIVERSITY