Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer block? #25

Open
horasal opened this issue Jul 20, 2014 · 0 comments
Open

Defer block? #25

horasal opened this issue Jul 20, 2014 · 0 comments

Comments

@horasal
Copy link
Owner

horasal commented Jul 20, 2014

some thing like this:

test := malloc(10)
defer test free()

Not like go, defer works block-wise, it means that we can use it in for loop:

for(name in fileNames){
    f := File new(name)
    defer f close()
    // do something
}
horasal pushed a commit that referenced this issue Mar 9, 2016
Fixed default value in enum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant