Modularizing code in functions
VB provides hundreds of built-in functions. These functions can be used to perform standard calculations, manipulate strings and arrays, and interact with the user interface of a program. These out-of-the-box functions are basically code-written and tested for you to reuse. Here are some commonly used functions in VB:
Abs: Returns the absolute value of a number without its sign.Date: Returns the current date while a program is running.Cint: Converts a parameter to an integer.Format: Formats a numeric or date value as a string.InStr: Returns the position of the first occurrence of a substring in a string. This is similar to thefindfunctionality in word processing software.Int: Returns the integer portion of a number.Lcase: Converts a string to lowercase.Left: Extracts a specified number of characters from the beginning of a string. This is similar to theMidfunction but only works from the left side of the...