Nope, but as arrays offer efficient random subscripting you might as well write:
for I in {Array.low A}..{Array.high A} do {Browse A.I} end
Cheers,
Jorge.
2009/7/20 Oliver Mooney <[email protected]>:
> Dear all,
> Does the Loop construct work with Arrays created using NewArray? If not is
> there any built-in functionality for cycling through the contents of an
> Array? For example,
> TestArray = {NewArray 1 10 1}
> for X in TestArray do {Browse X} end
> This raises a type error:
> %*************************** type error *************************
> %**
> %** Expected type: record or chunk
> %** At argument: 1
> %** In statement: 1 . 1 = _<optimized>
> %**
> %** Call Stack:
> %** procedure 'ForProc' in file "/Users/Oliver/Documents/CTM ex 7.6.oz",
> line 22, column 0, PC = 2435632
> %**--------------------------------------------------------------
> Thanks,
> Oliver.
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users