module 7

A function is similar to a normal procedure but the main purpose of the function is to accept 
a certain input and return a value, which is passed on to the main program to finish the 
execution. There are two types of functions, the built-in functions (or internal functions) and 
the functions created by the programmers. 
The general format of a function is 
 FunctionName (arguments)
 The arguments are values that are passed on to the function. 
In this Chapter, we are going to learn two very basic but useful internal functions of Visual 
Basic, i.e. the MsgBox( ) and InputBox ( ) functions. 

Summary 
You learned that a function is a procedure that accepts an input and returns a value, 
which is passed on to the main program to finish the execution. You also learned 
that the format of a function is FunctionName (arguments).
 In section 10.1, you learned to use the Msg () function to produce a popup 
message box to prompt the user to click on a button to continue the 
execution.
In section 10.2, you learned how to use the InputBox to get the input from the 
user.


String Functions 
 Understanding the String Functions 
Summary 
In this chapter, you learned how to use various string manipulation functions. 
 In section 11.1, you learned how to use the Mid function to retrieve a part of text 
from a phrase. 
 In section 11.2, you learned how to use the Right function to extracts the right 
portion of a phrase. 
 In section 11.3, you learned how to use the left function to extracts the left 
portion of a phrase 
 In section 11.4, you learned how to use the Trim function to trims the empty 
spaces on both side of the phrase. 
 In section 11.5, you learned how to use the Ltrim function to trim the empty 
spaces of the left portion of the phrase. 
 In section 11.6, you learned how to use the Rtrim function to trim empty spaces 
of the right portion of the phrase.
 In section 11.7, you learned how to use the InStr function looks for a phrase that 
is embedded within the original phrase and returns the starting position of the 
embedded phrase.
 Section 11.8, you learned how to use the Ucase function to convert all the 
characters of a string to capital letters and the Lcase function to convert all the 
characters of a string to small letters.
 In section 11.9, you learned how to use the Chr function to return the string that 
corresponds to an ASCII code and the Asc function to convert an ASCII 
character or symbol to the corresponding ASCII code

Comments

Popular posts from this blog

Module 3