Intrinsic functions

We have seen some of the function methods of the Math class, and many other classes have function methods as well.

VB also comes with some built-in or intrinsic functions that are not methods of any class. We have already been using some of these in doing data type conversion. When you write:

TextBox1.Text = Cstr (15)
You are calling the intrinsic Cstr function.

There is just a slight syntax difference between calling intrinsic functions and functions that are methods of a class: you can use the function name without a class name.

While most of the functions in VB are methods of a class, there are other intrinsic functions. For example, the pmt function is one of several financial functions, and its arguments are the interest rate of the loan, the number of payment periods it runs for and its principle.

Function Returns Syntax Data type Number of Arguments
pmt loan payment amount pmt (<numeric expression>, <numeric expression>, <numeric expression>) double 3


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.