Automation in code generation: Lesson 1 – Working with vectors.

A vector is a one-dimensional matrix with n positions. Each position can store a value of any type. Vectors are commonly used in automated scripts, because they allow multiple values to be stored in a single script variable.

Example of vector statement:

‘states a 3-position vector
Dim auxVetor(2)

‘saves values in each position
auxVetor(0) = 15
auxVetor(1) = 47.8
auxVetor(2) = “test”

Another option is using Array method:

‘states a script variable
Dim auxVetor

‘saves a vector inside it
auxVetor = Array(15, 47.8, “test”)

Before proceeding to Lesson 2, we recommend reading the following articles:

Basic VBScript for Elipse E3: Lesson 8 – Arrays.
KB-30127: Using an internal tag as vector (Array).
KB-47537: Measuring arrays.
KB-45438: Declaring a dynamic Array.

Related articles


Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *