Good afternoon! Help to resolve the arisen difficulty please...

There is the one-dimensional array consisting of four elements. It is necessary to pass this array in a cycle, comparing all elements. Proceeding from customary practices of programming. the decision shall be approximately such:

.....

.....

.....

preparations = 1..4

NumberGroupDev: array(preparations,preparations) of integer

NumberGroupDev:: [3,4,4,3]

forall(p in preparations) do

forall(p2 in preparations) do

sum(s in sticks,b in preparations)FinalSupplyQty(p,s)*NumberGroupDev(p,p) - sum(b in preparations,s in sticks)FinalSupplyQty(p,s)*NumberGroupDev(p2,p) <=0

end-do

end-do

However in case of this approach for any reason only the first identical couple is selected, and the second is discarded. Prompt please how to implement bit-by-bit comparing of values of an one-dimensional array? In advance many thanks!

The initialization of array data with

NumberGroupDev:: [3,4,4,3]

is equivalent to

NumberGroupDev(1,1):=3; NumberGroupDev(1,2):=4; NumberGroupDev(1,3):=4; NumberGroupDev(1,4):=3;

or also:

NumberGroupDev:: ([1],1..4)[3,4,4,3]

all other entries remain undefined.

Presumably you need something like

NumberGroupDev:: [3,4,4,3,3,4,4,3,3,4,4,3,3,4,4,3]

which is the shorthand for

NumberGroupDev:: (1..4,1..4)[3,4,4,3,3,4,4,3,3,4,4,3,3,4,4,3]