]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani: fix up the while/do scope
[ocean] / csrc / oceani-tests.mdc
index 973331fbddb67baf77e17ed8ddec4ab21809a93c..2433cce68593ee7f01153beec063927f4259b05f 100644 (file)
@@ -365,13 +365,14 @@ Here I break it into two parts, keeping the array code separate.
                        else
                                hi = mid
                        if hi - lo < 1:
+                               lo = mid
                                use GiveUp
                        use True
                do pass
                case Found:
                        print "Yay, I found", target
                case GiveUp:
-                       print "Closest I found was", mid
+                       print "Closest I found was", lo
 
 ###### output: sayhello,55,33,hello,True
        Hello World, what lovely oceans you have!