Visual Basic (VB for short) is a general object-based programming language developed by Microsoft. It is structured, modular, object-oriented, and includes assistance in development A visual programming language for environmental event-driven mechanisms.
In VB, sqr is the square root.
The Sqr function returns the square root of a number.
1. Syntax
Sqr(number)
2. Note: The number parameter cannot be a negative value.
The following example uses the Sqr function to calculate the square root of a value:
Dim MySqr MySqr = Sqr(4) ' 返回 2。 MySqr = Sqr(23) ' 返回4.79583152331272。 MySqr = Sqr(0) ' 返回0。 MySqr = Sqr(-4) ' 产生实时错误。
For more VB tutorials, please visit PHP Chinese website.
The above is the detailed content of What does sqr mean in vb?. For more information, please follow other related articles on the PHP Chinese website!