Home / code / asp

Tables,

Variables hold 1 value, tables can contain several values of the same kind. Like days of the week, names of months...
Also known as arrays in other programming languages.

Definition of a table

DIM tablename(numberofelements)

tablename Name of the table
numberofelements How many elements are in the table

If you have a table 5 elements and the table should have 8 elements. You can REDIM it. Everything is lost in the table unless you use PRESERVE.

To give a element a value:
weekday(1)="Monday"
weekday(2)="Tuesday"
day=5
weekday(day)="Friday"

More-dimensional tables

DIM tablename(x,y)

VB-Script can work with tables of 60 dimensions

 

TOP

Latest script:

 

Books: