40 likes | 166 Views
6d – Built-in Procedures. CSCI N331 VB .NET Programming. Lingma Acheson. Department of Computer and Information Science, IUPUI. Built-in Procedures. Procedure definition is already provided to the programmer in the class library. Programmer only needs to know how to call the procedure.
E N D
6d – Built-in Procedures CSCI N331 VB .NET Programming Lingma Acheson Department of Computer and Information Science, IUPUI
Built-in Procedures • Procedure definition is already provided to the programmer in the class library. Programmer only needs to know how to call the procedure. • E.g. lstOutput.Item.Clear() Cint(txtInput) Val(txtFirst.Text)
String Functions • CStr(value): Convert a numeric valueto String Len(string): get string length LCase(string): change to lower case Ucase(string): change to upper case Mid(string,n): get the substring starting from nth position …
Math Functions • Math.Sqrt(n): get the square root of n Math.Max(x, y): Find the larger value of x and y Math.Min(x,y): Find the smaller value of x and y Math.Round(x): Round the x x^y: get the x to the yth power random.Next(x): generate a random number smaller than x …