먼저 Reference문서를 보면 IS BOUND와 IS INITIAL의 기능을 설명 하고 있다.
IS BOUND
참조 값이 유효할 경우 그 값을 를 참조 한다 -> 스택에 없거나 삭제된 경우 존재 하지 않는 값이냐? 고 묻는데 사용할 수 도 있다.
IS INITIAL
피연산자가 초기값인지 확인한다
또 다른 Reference에는
IS BOUND는 개체(object reference)을 구체적화할때 쓰고
IS INITIAL은 더 큰 개념으로 사용한다 변수, ITAB, 개체 등 더 큰 범주에서 사용된다
개체를 참조할경우 IS BOUND를 사용하기를 권하고 있다.
Well, the only thing that I would say is, that the IS BOUND syntax is specific to object references, so when you see this in your code, you automatically know that you are talking about an object, if you use IS INITIAL, it becomes ambiguous as to what you are talking about, since it could be a variable, internal table, or object reference. I believe that the IS BOUND syntax should always be used when referring to object references, this provides for better readibility and maintance.
'ABAP' 카테고리의 다른 글
ABAP : 인터널 테이블에서의 MOVE-CORRESPONDING (0) | 2022.10.12 |
---|---|
ABAP : Field Symbol 필드심볼 (0) | 2022.10.12 |
ABAP : ALV에서의 CRUD (0) | 2022.10.07 |
ABAP : IS_READY_FOR_INPUT을 이용한 ALV 필드 EDIT CONTROL (0) | 2022.10.07 |
ABAP : ALV에서의 SOFT REFRESH (0) | 2022.10.05 |