728x90

Print의 도움말 창을 보면, Print 뒤에 각종 글자들이 쓰여있다. 뒤에 쓰여져 있는 글자들이 'argument'다. Argument는 오브젝트에 대한 변수를 설정하거나 바꿀 때 사용되고, 오브젝트가 다루는 메시지와 데이터의 유형과도 관련이 있다. 대부분의 경우, 특정 argument는 초기값을 대체한다.

여기서 메시지 박스를 클릭하면, Print-Hello world가 출력된다.


하지만 Print 뒤에 this argument를 넣어주자, Print 대신에 'this'가 출력된다. 즉, 기본값인 print가 this에 의해 대체되는 것이다.
근데 하나 의문점이 드는 것이, 왜 this argument-Hello world가 아니냐는 것이다. 이유는 print 오브젝트의 특성 때문이다. print 오브젝트는 오직 하나의 argument만 받을 수 있기 때문에 this 다음에 argument는 무시하게 되는 것이다.
결론적으로, max console은 아래와 같이 데이터를 받아들인다.
- 오브젝트: this
- 메시지: Hello world
반응형
'Max,MSP,Jitter for Music > 1. 프로그래밍에 대해' 카테고리의 다른 글
6. 숫자: 정수와 소수점 (0) | 2021.04.25 |
---|---|
5. 메시지 안에 데이터를 분리하기 (0) | 2021.04.25 |
3. 도움말 패쳐 (Help Patchers) (0) | 2021.04.25 |
2. 맥스 윈도우 (Max Window)-Print, Message 오브젝트 (0) | 2021.04.25 |
1. Button (버튼)-Bang! (0) | 2021.04.25 |