브레인퍽: 두 판 사이의 차이

내용 삭제됨 내용 추가됨
1 개의 출처 구조, 0 개의 링크를 깨진 것으로 표시) #IABot (v2.0
TedBot (토론 | 기여)
잔글 봇: 틀 이름 및 스타일 정리
91번째 줄:
=== [[헬로 월드 프로그램]] ===
명령어에 쓰이는 8개의 문자(+-<>[],.)만 사용한 코드는 다음과 같다.
<sourcesyntaxhighlight lang="bf">
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
</syntaxhighlight>
</source>
브레인퍽은 이 8개의 문자외에는 모두 무시하므로, 가독성을 위해 공백과 줄바꿈을 넣고 주석을 추가하여 다시 쓴 코드는 다음과 같다.
<sourcesyntaxhighlight lang="bf">
+++++ +++++ initialize counter (cell #0) to 10
[ use loop to set the next four cells to 70/100/30/10
> +++++ ++ add 7 to cell #1
> +++++ +++++ add 10 to cell #2
> +++ add 3 to cell #3
> + add 1 to cell #4
<<<< - decrement counter (cell #0)
]
> ++ . print 'H'
> + . print 'e'
117번째 줄:
> + . print '!'
> . print '\n'
</syntaxhighlight>
</source>
=== [[ROT13]] ===
<sourcesyntaxhighlight lang="bf">
 
-,+[ Read first character and start outer character reading loop
149번째 줄:
<-,+ Read next character
] End character reading loop
</syntaxhighlight>
</source>
 
== 관련 항목 ==