]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani: fix a couple of issues
[ocean] / csrc / oceani-tests.mdc
index 6ea120447b33dd3134339efcb819776d6eff89c9..90bfc19da11d84241256fdba41c6b06bd5376db9 100644 (file)
@@ -532,11 +532,15 @@ ad-hoc things array related.
                bools[1] = strings[2] <= "there"
 
                for i:=0; then i=i+1; while i<5:
-                       print '', bools[i],
+                       j ::= i
+                       ra:[5]number
+                       ra[i-1] = i*i
+                       ra[6] = 42 // mustn't crash
+                       print '', bools[i], ra[j-1],
                print
 
 ###### output: arrays
-        False True False False False
+        False 0 True 1 False 4 False 9 False 16
 
 ## Structures