티스토리 뷰
728x90
let a = 100
let b = 200
func plus (num001 : Int, num002 : Int) -> (Int) {
return (num001 + num002)
}
func minus (_ num001 : Int, _ num002 : Int) -> (Int) {
return (num001 - num002)
}
func multiply (_ num001 : Int, _ num002 : Int) -> (Int) {
return (num001 * num002)
}
var inputButtonType = "+"
if inputButtonType == "+" {
print("result", plus(num001: a, num002: b))
} else if inputButtonType == "-" {
print("result", minus(a, b))
} else if inputButtonType == "*" {
print("result", multiply(a, b))
}
func displayCalc(result: ((Int, Int) -> Int)) {
print("result", result(a, b))
}
if inputButtonType == "+" {
displayCalc(result: plus)
}
728x90
'ios' 카테고리의 다른 글
enum : Int (0) | 2022.05.24 |
---|---|
main interface (start view) (0) | 2022.05.24 |
function (0) | 2022.05.23 |
closure (0) | 2022.05.23 |
check positive number || upper case || check lower case (0) | 2022.05.22 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- custom web view
- 화면 방향 고정
- create new project
- 화면 고정
- Inputmode
- logtag
- 클래스 이름
- web view settings
- android studio
- 안드로이드
- Android
- permissions
- screenorientation
- kotlin
- 웹뷰
- 로그캣
- logcat
- 외부 브라우저
- defaultInputmode
- simpleName
- javaClass
- web view
- StringWriter
- create project
- 영문 키보드
- andorid
- 코틀린
- web chrome view
- check permissions
- new project
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
글 보관함