As we all know, vb has been widely used. The reason is that it learns simple and easy to apply. It uses actviv x (OLE) technology and is almost omnipotent, but it cannot be called a standard language. It is also notorious in N aspects. Vbscript is derived from the grammar of vb. Basically speaking, vbscript is about vb. vbscript. If I follow my high school time, then his good predecessor is basic, qbasic, and trubo basic.
As a scripting language, people who have learned basic must be familiar with him. He is the brother of vb and basic, but how many people have a deep understanding of it. Let's take a look at his array!
Maybe many people know
dim a(3) can define a one-dimensional array with three subscript variables
dim a(3,4) can define a two-dimensional array with three rows and four columns
dim a(3,4,5) can define a three-dimensional array
Up to 60 dimensions
dim a() can define a dynamic array
Use redim a(3) to redistribute storage space!
redim Preserve a(5) Can redistribute storage space without losing data.
These are all classic applications of arrays, and I think most people are very familiar with them.
So has anyone used this? Examples are as follows:
dim a(3)
dim b(4)
a(0)=b
The above code will not error. The result is that ubund(a(0)) is 4, indicating that a(0) is an array. This is like using one-dimensional arrays to form two-dimensional or multi-dimensional arrays in js.
Then modify the above code:
dim a(2)
dim b()
redim b(3)
a(0)=b
redim b(5)
After the above code is executed, ubund(a(0)) is 3, indicating that a(0) is not a reference to b, but an array space is allocated for a(0).
It can be seen that variables in vbscript are the characteristics that can store any data type, that is, the variables in my js are not of similar type.
As a scripting language, people who have learned basic must be familiar with him. He is the brother of vb and basic, but how many people have a deep understanding of it. Let's take a look at his array!
Maybe many people know
dim a(3) can define a one-dimensional array with three subscript variables
dim a(3,4) can define a two-dimensional array with three rows and four columns
dim a(3,4,5) can define a three-dimensional array
Up to 60 dimensions
dim a() can define a dynamic array
Use redim a(3) to redistribute storage space!
redim Preserve a(5) Can redistribute storage space without losing data.
These are all classic applications of arrays, and I think most people are very familiar with them.
So has anyone used this? Examples are as follows:
dim a(3)
dim b(4)
a(0)=b
The above code will not error. The result is that ubund(a(0)) is 4, indicating that a(0) is an array. This is like using one-dimensional arrays to form two-dimensional or multi-dimensional arrays in js.
Then modify the above code:
dim a(2)
dim b()
redim b(3)
a(0)=b
redim b(5)
After the above code is executed, ubund(a(0)) is 3, indicating that a(0) is not a reference to b, but an array space is allocated for a(0).
It can be seen that variables in vbscript are the characteristics that can store any data type, that is, the variables in my js are not of similar type.