inout1 Swift) inout 파라미터 머리말 Swift는 다른 언어와 다르게 함수의 파라미터가 상수여서 파라미터의 값을 변경하려면 "inout"이라는 키워드를 사용해야 한다. 우리말로 하면 "출입"이라는 키워드일텐데 도대체 이 키워드는 무엇인지 살펴 보자. 본문 공식문서의 inout 한번 공식문서에서 inout을 살펴 보자 In-Out Parameters in Functions You write an in-out parameter by placing the inout keyword right before a parameter’s type. An in-out parameter has a value that’s passed in to the function, is modified by the function, and is passed back .. 2024. 4. 10. 이전 1 다음 반응형