"주석"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>))
잔글 (봇: Jmnote의 2020-10-30T13:39:28Z 에 작성한 603368 판으로 되돌림)
19번째 줄: 19번째 줄:
   */
   */
  public void setToolTipText(String text) {
  public void setToolTipText(String text) {
</syntaxhighlight>
</source>


==형식상 주석==
==형식상 주석==
26번째 줄: 26번째 줄:
<source lang='python'>
<source lang='python'>
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
</syntaxhighlight>
</source>


==언어별 주석==
==언어별 주석==

2020년 11월 2일 (월) 00:51 판

  다른 뜻에 대해서는 주석(comment) 문서를 참조하십시오.
  다른 뜻에 대해서는 주석(tin) 문서를 참조하십시오.
  다른 뜻에 대해서는 주석 (관직) 문서를 참조하십시오.

1 개요

comment, annotation
주석, 코멘트, 어노테이션, 애너테이션[1]
  • 소스코드 중 사람이 임의로 기술한 내용
  • 사람이 알기 쉽게 첨가한 설명내용
  • 처리시에는 무시되므로 자유롭게 글 작성 가능

2 Java 예시

 /**
  * Registers the text to display in a tool tip.   The text 
  * displays when the cursor lingers over the component.
  *
  * @param text  the string to display.  If the text is null, 
  *              the tool tip is turned off for this component.
  */
 public void setToolTipText(String text) {

3 형식상 주석

  • 드문 경우이지만, 컴파일/런타임시 의미 있는 경우도 있다.[2]
  • 예: Python에서 소스코드의 encoding
# -*- coding: utf-8 -*-

4 언어별 주석

5 같이 보기

6 참고

  1. [ӕnətéiʃən]
  2. 이런 경우, 형식은 주석이지만, 실제로는 기능이 있는 것이므로 주석은 아니다.
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}