Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arrays
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Re: Arrays
Miscellaneous
Thread ID:
00519656
Message ID:
00519673
Views:
20
Hi Peter,

I'm a little confused. As I read it, you want to create a 4x4 array of numeric elements and then fill additional columns with other values based on analyses of the 4x4 array.

The computations to do this are not difficult -- you can use a FOR/NEXT loop to scan the array rows (using FOR lnRow = 1 TO ALEN( MyArrayName, 1) as the FOR statement) and compare the numeric elements with each other, setting a logical flag if any of them match each other in a particular row. Inside the same scan, you can use the MAX() function to determine what the largest of the numeric elements in the row is, and also total the numerics for your last result column to a private variable, resetting it at the beginning of each iteration of the FOR/NEXT loop.

What I don't understand is WHERE you want to store those other values: in the SAME array as the numerics, or another array?


>hi all:
>
>I am in need of some help in foxpro 2.6. I need to write a 4x4 array. In the array I will compare 4 numbers. I any of the numbers equal each other either 2 the same or 3 or all four I want to put an "X" in a column of the array. I also want to populate another column with the largest number and fianl the last column is all the numbers in the array.
>
>examples of numbers used in the array
>30,30,23,12 - 2 same
>40,12,15,90 - 0 same
>50,50,50,12 - 3 same
>30,30,30,30 - 4 same
>
>seq same largest number
>1 X 30 30
>2 X 30
>3 23
>4 12
>
>
>Can anyone help me?
>
>Thanks
>
>Peter
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform