X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=blobdiff_plain;f=csrc%2Foceani-tests.mdc;h=90bfc19da11d84241256fdba41c6b06bd5376db9;hp=6ea120447b33dd3134339efcb819776d6eff89c9;hb=b5a63d46c787e442d44b5fd1d70d007498bd5058;hpb=13482f902f9fa5d303a3a738a18fe17fdb734930 diff --git a/csrc/oceani-tests.mdc b/csrc/oceani-tests.mdc index 6ea1204..90bfc19 100644 --- a/csrc/oceani-tests.mdc +++ b/csrc/oceani-tests.mdc @@ -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