[ios] extern 변수에 nullability 지정하기 [ios] extern 변수에 nullability 지정하기 -nullability 에 대한 호환이 100% 갖춰지지 않아서인지 이 글을 쓰는 시점에 순서가 명확하지 않은 부분들이 있다. -아래와 같은 순서로 type 과 const 사이에 써 주면 된다.extern NSString * _Nonnull const kTESTMyConst; const, nullability, [ios] extern 변수에 nullability 지정하기, _Nonnull, _Nullable, 위치 2017. 12. 16. [Kotlin Tutorial] Kotlin 의 Type system - Chap6. The Kotlin type system [Kotlin Tutorial] Kotlin 의 Type system - Chap6. The Kotlin type system 출처 : Kotlin in action 6.1. Nullability 6.1.1. Nullable types -Kotlin 은 nullable types 를 지원한다.nullable type 이라는 것은 어떤 variable 이 null 을 가질 수 있는지를 명시하는 것이다. -nullable 하지 않은 곳에 null 을 넣으면 compile error 가 난다.기본 type 은 nullable 하지 않으며, nullable 을 만드려면 type 뒤에 ? 를 붙여주면 된다.어떤 타입이든 뒤에 ? 를 붙여줄 수 있다.fun strLenSafe(s: String?) = … 6.1.2.. 2017. 8. 18. 반응형 이전 1 다음