meaning of Redim in classical Asp

Asked

Viewed 980 times

3

What does that mean?

redim preserve VetRede(iCont)

Vetrede is a variable declared in Asp(I put this, otherwise the body of the question is outside the standards, few words), eheheheh!

1 answer

4


The builder redim resizes an array at runtime.

It is important that you also know the preserve which is used to preserve existing values.

redim preserve array()

The preserve is not mandatory, but it is good to know for when you need.

In a practical way

dim VetRede(5) ' Declara um array com 5 índices

redim VetRede(15) ' Redimensiona o array existente para suportar 15 índices.

redim preserve VetRede(15) ' Redimensiona o array existente preservando dados que porventura possam existir.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.