-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
$switch not working on Windows build #2046
Comments
You want: |
as does Whereas That's not the error anyway. The error is reported on the $case line. |
The documentation follows 0.6.8 syntax. You said you were using 0.7.0 prerelease. This should compile fine in 0.7: const OUTPUT = 1;
$switch OUTPUT:
$case 0:
io::printn(2);
$endswitch Can you send me a bigger part of code? |
I'm away from desk at the moment but will try to find the smallest set of code that will produce the error and send it in a few days.
…On 16 March 2025 22:08:56 UTC, Christoffer Lerno ***@***.***> wrote:
lerno left a comment (c3lang/c3c#2046)
The documentation follows 0.6.8 syntax. You said you were using 0.7.0 prerelease.
This should compile fine in 0.7:
```c
const OUTPUT = 1;
$switch OUTPUT:
$case 0:
io::printn(2);
$endswitch
```
Can you send me a bigger part of code?
--
Reply to this email directly or view it on GitHub:
#2046 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
That syntax does work on 0.7. My linux distro hasn't updated its version of c3c yet so the two are out of sync. Are there other syntax changes? Are they documented somewhere? I ask because I'm getting a few other problems when compiling with 0.7.0 on Windows that don't occur with 0.6.7 on linux. I there a way to get the older binary for Windows? |
BTW, I did get c3c to cross compile from linux to windows, so my issue is solved and I'm happy to close this now. Thanks for your patience. |
Using the latest Windows binary, version 0.7.0, this comes from the compiler:
Clearly, it reports a missing ':' character although the character is in the code. OUTPUT is a const int defined earlier in the file. This same file compiles without error in linux and works as expected.
The text was updated successfully, but these errors were encountered: