Syntax for variable

Advanced programming using WinTask scripting language

Syntax for variable

Postby Joshua on Thu Dec 13, 2012 10:13 am

I have 3 arrays for 3 pieces of address, such as:
Address1_town$(i)="New York"
Address2_town$(i)="Kensington street"

I would like to create a variable for using AddressRet_town$(i) with Ret at 1, 2 or 3

What is the syntax?
Posts: 14
Joined: Fri Jul 08, 2005 9:21 am

Re: Syntax for variable

Postby TechSupport on Fri Dec 14, 2012 9:12 am


It is not possible to have a variable within an array variable.

So such a line
Dim AddressRet_town$(100)
is not accepted as the Dim lines must be the first ones and so Ret would have no value.

It seems for me that you should do the opposite : you can declare an array for the line instead of the different columns
Dim line$(5)
line$(0)="New York"
line$(1)="Kensington street"

and in a loop you can populate line$ reading the Excel file line by line.

WinTask Tech Support
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am

Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 2 guests