문자열에 작은따옴표 하나를 넣으려면 ' 문자를 두 번 쓰면 됩니다. 예를 들어
messageText := '''sample text''';
Writeln(messageText)
첫 작은따옴표가 문자열을 열고, 그다음 두 개가 따옴표 하나를 나타냅니다. 끝부분도 같은 방식입니다.
다른 이스케이프 문자는 # 뒤에 숫자를 써서 나타낼 수 있습니다. 예를 들어
줄바꿈은:
messageText := 'Line break' + #13 + #10
또는 간단히
messageText := 'Line break'#13#10
물론 플랫폼에 맞는 줄바꿈 상수를 쓰는 편이 더 좋습니다.
영어에서 번역·원문 보기A string can contain a single quote by doubling the ' character, for example
messageText := '''sample text''';
Writeln(messageText)
Here the first single quote opens the string, followed by a pair representing one quote. The ending uses the same arrangement.
Other escape characters can be written with # and a number, for instance
For a line break:
messageText := 'Line break' + #13 + #10
or simply
messageText := 'Line break'#13#10
Naturally, the platform-specific newline constant is the preferable choice.