Wednesday 24 February 2016

Julia: break statement


‘break’ statement is used to come out of loops like while, for.

julia> a=0;

julia> while(true)
           a+=1
           println("a=$a")
           if(a==5)
               break
           end
       end
a=1
a=2
a=3
a=4
a=5



Previous                                                 Next                                                 Home

No comments:

Post a Comment