체계에서 긴 문자열 선을 어떻게 깨뜨릴 수 있습니까?
-
18-09-2019 - |
문제
예를 들어 아래 공황 진술에서 긴 줄을 끊고 싶습니다.
(panic "Truth-assignment length is longer than the number of propositions!")
나는 시도했다
(panic "Truth-assignment length is longer than the number \
of propositions!")
그리고
(panic "Truth-assignment length is longer than the number
of propositions!")
그리고 둘 다 작동하지 않습니다. 인터넷 검색도 아무 것도 나타나지 않았습니다.
해결책
IDE의 내장 형식과 함께 String-Append를 사용하십시오.
(panic (string-append "Truth-assignment length is longer "
"than the number of propositions!"))
다른 팁
모든 체계 사양이 긴 줄을 깨는 방법을 정의하는 것은 아닙니다. 귀하의 질문에 대한 답은 사용중인 체계에 따라 다릅니다. R6R은 처음 시도한 방법과 같은 방법이 포함되어 있다고 생각합니다. 다른 사람들은 그러한 옵션을 제공하지 않을 수 있으며, 문자열의 길이를 줄이고, 라인이 매우 길거나, 작은 문자열을 사용하여 문자열을 사용하도록 강요합니다.
이 링크를 살펴보십시오.http://www.mail-archive.com/r6rs-discuss@lists.r6rs.org/msg01810.html http://practical-scheme.net/gauche/ (2008/2/13에 대한 검색)
제휴하지 않습니다 StackOverflow