Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Redimensioning arrays
Message
De
09/07/2003 03:45:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/07/2003 03:41:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00808350
Message ID:
00808353
Vues:
11
>Hi,
>
>I have a quite strange problem. The following code demonstrates this.
>
>First, I create a simple array:
>
>dimension aTEST(3)
>
>for i=1 to 3
> aTEST(i)=i
>endfor
>
>Now, if I redimension this array:
>
>dimension aTEST(5)
>
>the values aTEST(1) ... aTEST(5) are all .f. ?? The values from 1 to 3 should have been copied to the new array? At least it worked earlier. I simply don't know why it doesn't work anymore... Maybe I should install VFP again?

Kari,
It does. Probably where you call it a second time, first array is out of scope. Try like this :

display memory like aTest && Check if array var is in scope
dimension aTEST(5)

Or:
messagebox(type('aTest[1]')) && This doesn't guarantee it's an array

messagebox(alen(aTest))
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform