|
|
|
It worked for me. This is what it printed:
|
|
how do you want the switch statement to behave? To call the default block in all cases? In that case, you have to add fallthrough in each case, excluding the default one. |
SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today! Sponsor Hacking with Swift and reach the world's largest Swift community! |
|
You posted the same thing in three threads within 15 minutes of each other. You have to give people a chance to answer before assuming nobody cares.
What does this mean? What do you expect it to do? What is it doing instead? You gotta give us something more to work with when asking a question. Just like @vtabmow, your code worked fine for me. |
|
All I got was [Running] swift "c:\Swift\bin\Switch Statements.swift" [Done] exited with code=0 in 6.002 seconds. I'm doing this on windows and using visual studios 2022 |
|
Yeah, sorry. I'm using visual studios 2022 on windows 10 to do this. It should work but all I get is it started running and then ended. |
|
Your code is fine. So look to Visual Studio for the issue. Maybe there's a setting for displaying |
|
|
|
Sounds like your code is running, you're just not seeing the output like @roosterboy is saying. Print shows up in the debug window. Try Ctrl+G maybe. |
|
This may sound weird @vtabmow but whats ur email, I tried ctrl+G, didnt work. I wanna send you pics on what it looks like. |
|
You can post pics here. See this link: https://www.hackingwithswift.com/forums/100-days-of-swiftui/how-do-i-add-my-screenshot/12652/12653 |
|
|
|
You can save those on your computer and then post using the instructions linked above. It's always best to post images to the forum unless the other person agrees to have them sent. Not everyone wants to give out their email address, twitter handle, etc. |
|
SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.