Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Store value to array
Message
From
22/06/2008 06:18:13
 
 
To
22/06/2008 03:50:03
Reza Meamar
Homa Programming Group
Shiraz, Iran
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01325992
Message ID:
01325993
Views:
18
>Dear all,
>I have an array as below
>
>Dimension MyArray(20,5)
>
>I want to set value of column 2 to 5000 in all rows.
>
>MyArray(1,2) = 5000
>MyArray(2,2) = 5000
>MyArray(3,2) = 5000
>.
>.
>.
>MyArray(20,2) = 5000
>
>What is the best way for this?
>A loop or i can do it with a command line?
>Thanks
Hi Reza,

You can replace the values of all elements in one line myArray=5000, but not only in the 2nd column (that among others is why in VFP local temp cursors are easier to use than arrays).
So as you said, a loop might be the easiest way.


hth
-Stefan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform