explicitly a cell of a dynamic array.
procedure create(x:array reference)
The following declares a dynamic array of variables, creating only those corresponding to the odd indices. Finally, it defines
the linear expression x(1) + x(3) + x(5) + x(7):
x: dynamic array(1..8) of mpvar
forall(i in 1..8| isodd(i)) create(x(i))
c:= sum(i in 1..8) x(i)
Usually cells of dynamic arrays are created by means of assignments.
This procedure can be used as a replacement for an assignment especially when
the type of a dynamic array does not
provide any assignment operator (like mpvar for instance).
If you have any comments or suggestions about these pages,
please send mail to firstname.lastname@example.org.
© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.