简体   繁体   English

如何在Mercury中将文本行继续到下一行?

[英]How continue line of text to next line in Mercury?

How do I continue a too-long line to a next line? 如何将太长的行继续到下一行? I tried using a backslash but the Mercury compiler doesn't accept that convention. 我尝试使用反斜杠,但Mercury编译器不接受该约定。 Have been unable to find an answer to this mundane question. 一直找不到这个平凡问题的答案。

I had used an editor to type a very long list of comma-separated integers. 我曾经使用过一个编辑器来键入非常长的逗号分隔的整数列表。 What I typed was something like (there was no ellipsis in what I typed) 我输入的内容类似(输入的内容中没有省略号)

A = [1, 2, 3, 4, 5, 65, 97, 211, 6, 7, 8, 9, 10, 47, 48, 51, 53, 57, 61, 75, 8006, 227, 301, 4093, 433, 225,..., 287]. A = [1、2、3、4、5、65、97、211、6、7、8、9、10、47、48、51、53、57、61、75、8006、227、301、4093 ,433,225,...,287]。

This line has naturally wrapped above, but on my editor it simply extended far to the right, and I wanted to fold the line so that it would all fit within editor lines that could be printed and easily read. 该行自然地包裹在上面,但是在我的编辑器上,它只是向右延伸很远,因此我想折叠该行,以使其都适合于可以打印并易于阅读的编辑器行。 The system accepted my list when I left it as a single long line, but when I tried to break it up into separate lines it gave me error messages. 当我将列表留为一行时,系统接受了我的列表,但是当我尝试将其分解为单独的行时,它给了我错误消息。 I didn't keep a record of what those messages were and can no longer remember. 我没有记录这些消息是什么,并且不再记得。 I was using a TextWrangler editor with the 'soft wrap' feature disabled. 我使用的TextWrangler编辑器已禁用“自动换行”功能。 That probably would have solved my problem. 那可能会解决我的问题。 The result would have looked right, and the compiler would probably have had no problem with it. 结果看起来应该是正确的,并且编译器可能对此没有任何问题。 I must have introduced end-of-line symbols that confused the Mercury system. 我肯定已经引入了混淆水星系统的行尾符号。 I think that's the answer. 我认为这就是答案。 Thinking through this has been helpful. 对此进行思考很有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM