Home  >  Article  >  What does sqr mean in vb?

What does sqr mean in vb?

尚
Original
2020-03-10 10:41:2620393browse

What does sqr mean in vb?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn