I have a 2 dimensional subscripted variable
Offer[Price,Quantity]
I need to sort it by Price and then I need to read the Quantity corresponding to each of the ordered Price.
I don't know how to fill the variables for the two dimensions, and I don't know how to call the value of the quantity relating to a price.
Thanks
Array
If I get your Idea right, it sounds more like you need a lookup or other one-to-one funcion.
But to answer part of your question. To input 2-dimensional arrays use comma's to separate the first set of values for quantity, then use a ; to input the next set of values corresponding to quantity and the second price. (1,2,3;1,2,3; ). But all this is in the manual under subscripts.
As far as I know it is only possible to order by the last subscript, so you should change their order.
[Edited on 17-3-2004 by Pruyn]
But to answer part of your question. To input 2-dimensional arrays use comma's to separate the first set of values for quantity, then use a ; to input the next set of values corresponding to quantity and the second price. (1,2,3;1,2,3; ). But all this is in the manual under subscripts.
As far as I know it is only possible to order by the last subscript, so you should change their order.
[Edited on 17-3-2004 by Pruyn]
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am