• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Nil Coalescing and Optional Chaining?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nil Coalescing and Optional Chaining?


  • Subject: Re: Nil Coalescing and Optional Chaining?
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 07 Nov 2014 09:55:43 -0600

On Fri, Nov 7, 2014, at 09:34 AM, David Wood wrote:
>
> > On Nov 7, 2014, at 9:36 AM, Charles Jenkins <email@hidden> wrote:
> >
> > Well, if you have only one argument, then arguments.count would be 1, but to get the argument, you’d ask for Process.arguments[0]. Arrays are zero-based.
>
> D'oh. Well, that fixed it. The final result looks like this:
>
> var inputValue = (Process.arguments.count > 1) ?
> Process.arguments[1].toInt()! : defaultValue
>
> ...and it runs properly in both in Xcode and as a command-line tool.
>
> Only now does it occur to me that the place to post this would have been
> a Swift-dev mailing list. Is that even a thing? There doesn't seem to be
> one of those on lists.apple.com.

There's no mailing list, but there's a very active section of the Dev
Forums, including far more Apple participation than on this list:
<https://devforums.apple.com/community/tools/languages/swift>

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Nil Coalescing and Optional Chaining? (From: David Wood <email@hidden>)
 >Re: Nil Coalescing and Optional Chaining? (From: David Wood <email@hidden>)
 >Re: Nil Coalescing and Optional Chaining? (From: Charles Jenkins <email@hidden>)
 >Re: Nil Coalescing and Optional Chaining? (From: David Wood <email@hidden>)

  • Prev by Date: Re: Nil Coalescing and Optional Chaining?
  • Next by Date: Re: Weak linking
  • Previous by thread: Re: Nil Coalescing and Optional Chaining?
  • Next by thread: Serious bug for UICollectionView
  • Index(es):
    • Date
    • Thread