|
When I run the code above in playground, it prints the final element of the array only. When run my output is:
Expected behavior? Sonoma 14.2, Xcode 15.0.1 edit: running the swift code from the command-line displays each element. |
|
|
|
Thanks for the reply, I'm not allowed to insert an image or to link to an image, unfortunately. I wanted to show exactly what I was seeing I have two panels: The left-hand panel, where I'm entering code, has line-numbers. The right-hand panel shows only partial output. the screencap can be seen at http // jocala dot com / play.png |
|
You need to show the debug area. You can do this under the |
|
|
|
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.