(!****************************************************** Mosel User Guide Example Problems ================================= file arraydef.mos ````````````````` Defining arrays. (c) 2010 Fair Isaac Corporation author: S. Heipcke, Jul. 2010 *******************************************************!) model "array definition" declarations A1: array(1..3) of integer F = {"a","b","c"} A2: array(F) of real A3: array(R:range) of integer A4: dynamic array(F) of real end-declarations writeln("A1:", A1, " A2:", A2, " A3:", A3, " A4:", A4) A1::[10,20,30] A2::(["a","b","c"])[1.1, 2.5, 3,9] A3::(1..3)[10,20,30] ! Redefine an entry A2("a"):=5,1 ! This line leads to an 'index out of range' error ! A2("d"):=5,1 setrandseed(3) forall(f in F) A4(f):= 10*random delcell(A4("a")) writeln("A1:", A1, " A2:", A2, " A3:", A3, " A4:", A4) end-model