Re: Swift question
Re: Swift question
- Subject: Re: Swift question
- From: David Delmonte <email@hidden>
- Date: Wed, 04 Jun 2014 21:31:27 +0300
Thanks for the fast responses.
I am almost there..
If I do this (thanks Carl):
var hammerTitle = " hammers"
if hammers == 1 { hammerTitle = " hammer" } let toolSummary = "I have \(nails) nails and \(hammers)" + hammerTitle
println("toolSummary: \(toolSummary)") println()
I do get the desired result if hammers does equal 1. If hammers does not equal 1, it also works, but I get a compiler warning: “Will never be executed” on the hammerTitle = " hammer" statement. It’s the same if I redeclare hammerTitle in the if statement.. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden