第12月第26天 swift 下划线
1.
The _ is used to define that the parameter is not named
If you have multiple _ it states that you do not need to name the parameters in your function call
func myFunc(name:String, _ age:String){
}
myFunc(“Milo", "I'm a really old wizard")
If you do not use the underscore you would use
myFunc(“Milo”, age: "I'm a really old wizard")
The _ is not necessary in function calls. It is just used to indicate that something does not to have a name.
In regards to how you would refer to your function, You would not have to pass any name for the function call.
But since you also don’t define a parameter type this seems to me like a invalid example (it at least doesn’t work in xCode 7 with swift 2.0)
Edit:
Since swift 3.0
myFunc(name: “Milo”, age: "I'm a really old wizard")
Should be used
http://www.cnblogs.com/bhlsheji/p/4746072.html
https://stackoverflow.com/questions/30876068/what-is-in-swift-telling-me
2.
// Set up the quad vertices with respect to the orientation and aspect ratio of the video.
CGRect vertexSamplingRect = AVMakeRectWithAspectRatioInsideRect(self.presentationRect, self.layer.bounds);
第12月第26天 swift 下划线的更多相关文章
- 2018年12月25&26日
小结:昨天因为整理课件,调代码耗费了大量时间,所以没来得及整理作业,这两天主要做的题目是关于树链剖分和线段树的,难度大约都是省选难度,毕竟只要涉及到树链剖分难度就肯定不低. 一. 完成的题目: 洛谷P ...
- 2013年12月26日 星期四 doxygen入门--很好
body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...
- 2016年12月31日 星期六 --出埃及记 Exodus 21:26
2016年12月31日 星期六 --出埃及记 Exodus 21:26 "If a man hits a manservant or maidservant in the eye and d ...
- 2016年12月26日 星期一 --出埃及记 Exodus 21:21
2016年12月26日 星期一 --出埃及记 Exodus 21:21 but he is not to be punished if the slave gets up after a day or ...
- 2016年12月5日 星期一 --出埃及记 Exodus 20:26
2016年12月5日 星期一 --出埃及记 Exodus 20:26 And do not go up to my altar on steps, lest your nakedness be exp ...
- VC++6.0 下配置 pthread库2010年12月12日 星期日 13:14VC下的pthread多线程编程 转载
VC++6.0 下配置 pthread库2010年12月12日 星期日 13:14VC下的pthread多线程编程 转载 #include <stdio.h>#include &l ...
- 我的Python成长之路---第一天---Python基础(1)---2015年12月26日(雾霾)
2015年12月26日是个特别的日子,我的Python成之路迈出第一步.见到了心目中的Python大神(Alex),也认识到了新的志向相投的伙伴,非常开心. 尽管之前看过一些Python的视频.书,算 ...
- 北京Uber优步司机奖励政策(12月26日)
滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...
- [2018-11-27]2018年12月1日宁波dotnet社区线下活动
离上次活动,转眼又过了一个月,幸得各路大神支持,于本周六(12月1日),宁波dotnet社区的线下分享活动又来啦! 活动嘉宾及主题 董斌辉 2015-2019年微软全球最有价值专家(.NET方向) 2 ...
随机推荐
- [T-ARA][O My God]
歌词来源:http://music.163.com/#/song?id=22704432 눈을 뜨면 생각이나고 길을 걷다 생각이나고 [nu-neul ddeu-myeon saeng-ga-gi ...
- CSAPP lab2 二进制拆弹 binary bombs phase_5
给出对应于7个阶段的7篇博客 phase_1 https://www.cnblogs.com/wkfvawl/p/10632044.htmlphase_2 https://www.cnblogs. ...
- 决胜 Poker
团队展示 队名 决胜 Poker 团队人员 211606392 郑俊瑜 (队长) 211606355 陈映宏 211606358 陈卓楠 211606386 姚皓钰 211606323 刘世华 211 ...
- 20135220谈愈敏Blog5_系统调用(下)
系统调用(下) 谈愈敏 原创作品转载请注明出处 <Linux内核分析>MOOC课程 http://mooc.study.163.com/course/USTC-1000029000 给Me ...
- Beta阶段冲刺-6
一. 每日会议 1. 照片 2. 昨日完成工作 3. 今日完成工作 4. 工作中遇到的困难 杨晨露:各种问题,虽然都是开发上面的问题,但是都提出来就有点头大了. 戴志斌:对小程序公众号的开发不了解,因 ...
- 在局域网内部实现远程web终端服务
在局域网内部实现远程web终端服务 前言 如题,本文主要介绍了在局域网内部实现访问web终端服务功能. 实验环境 如下图所示,实验环境由三个部分组成:分别由局域网内部客户端.重定向服务器.以及两台提供 ...
- VS2013简单的单元测试
安装过程本人在此就不做多余的说明,如果一个程序员连一个软件都无法安装那我也醉了,其次就是希望我们不要为了完成作业而去用VS,下面我具体说一下单元测试. 第一步,文件→新建一个项目,具体操作如下图 打开 ...
- Activiti的ACT_GE_PROPERTY表初始化
create table ACT_GE_PROPERTY ( NAME_ ), VALUE_ ), REV_ integer, primary key (NAME_) ) ENGINE=InnoDB ...
- php artisan 命令列表
php artisan 命令列表 命令获取 上面的翻译内容 命令 说明 备注 php artisan make:resource ? 创建api返回格式化资源 >=5.4版本可用 php ar ...
- #pragma once 与 #ifndef 的使用
为了防止头文件被重复包含,主要有两种方式: 方式一:使用 #ifndef #ifndef OPTIONAL_TEST_H #define OPTIONAL_TEST_H //............. ...