# From C to Julia: Notes from a low-level port

**URL:** https://discourse.julialang.org/t/from-c-to-julia-notes-from-a-low-level-port/54743
**Category:** General Usage
**Created:** [February 6, 2021, 4:53pm UTC](https://discourse.julialang.org/t/from-c-to-julia-notes-from-a-low-level-port/54743 "2021-02-06T16:53:41Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![jebej](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jebej/32/1784_2.png) [@jebej](https://discourse.julialang.org/u/jebej)
#### Post date: [February 6, 2021, 5:30pm UTC](https://discourse.julialang.org/t/from-c-to-julia-notes-from-a-low-level-port/54743/5 "2021-02-06T17:30:13Z")

</div>

> [@adolgert](#):
>
> In Julia, for-loops have a new scope for the loop variable.

You can have the C behavior with the `outer` keyword:

> [@How to capture a for loop index after break?](https://discourse.julialang.org/t/how-to-capture-a-for-loop-index-after-break/46342/4):
>
> Are you looking for the outer keyword? function foo(p) local i for outer i = 1:100 rand() \> p && break end return i end

---

_[View the full topic](https://discourse.julialang.org/t/from-c-to-julia-notes-from-a-low-level-port/54743)._
