Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arrays
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Arrays
Miscellaneous
Thread ID:
00519817
Message ID:
00519817
Views:
50
hi all:

I am having troble with arrays and I do not understand them enough to write it right.
>
>I am in need of some help in foxpro 2.6. I need to write a array. In the array I will read in 4 numbers. If 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 showing they are equal. 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
>

1. read in 4 numbers x1,x2x3,x4, sum the numbers, see if numbers equal 100 print x1,x2,x3,x4 else if not error trap
2. see if one of xi = 100 and all remaining will = 0 print x1,x2,x3,x4
, if not go to step 3
3. set xi = xi + .5
4. truncate xi droping the 2 decimal numbers
5. total x1_x2_x3_x4 = xtot
6. if xtot = 100, print x1,x2,x3,x4
7. if xtot <> 100 compute the difference t_diff
8. NEQ number of equal numbers

>Can anyone help me?
>
>Thanks
>
>Peter
Next
Reply
Map
View

Click here to load this message in the networking platform