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

Chapter 1: incorrect For loop syntax #177

Closed
KTheRD opened this issue Jun 5, 2023 · 4 comments
Closed

Chapter 1: incorrect For loop syntax #177

KTheRD opened this issue Jun 5, 2023 · 4 comments

Comments

@KTheRD
Copy link

KTheRD commented Jun 5, 2023

Chapter 1 has this code:

for (string, 0..) |character, index| {
    _ = character;
    _ = index;
}

Compiler fails to parse with error: expected ')', found ','.
Maybe it was meant to be string[0..] instead of string, 0...

@thechampagne
Copy link
Contributor

This is syntax has introduced in zig 0.11.x

@KTheRD
Copy link
Author

KTheRD commented Jun 6, 2023

Oh, thanks. Then maybe marking not yet available features would be good?

@thechampagne
Copy link
Contributor

@KTheRD
In chapter 0: This guide assumes you’re using a master build of Zig as opposed to the latest major release, which means downloading a binary from the site or compiling from source; the version of Zig in your package manager is likely outdated. This guide does not support Zig 0.10.1

@KTheRD
Copy link
Author

KTheRD commented Jun 6, 2023

Thanks, I oversighted that!

@KTheRD KTheRD closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants