Difference between chr(13) and chr(10)

不羁岁月 提交于 2020-05-25 06:33:16

问题


What is the difference between chr(13) and chr(10) in Crystal Reports?

I know chr(13) is used as a line break. But one of our reports uses this line:

{Address1} + chr(13) + chr(10) + {Address2}

回答1:


Chr(10) is the Line Feed character and Chr(13) is the Carriage Return character.

You probably won't notice a difference if you use only one or the other, but you might find yourself in a situation where the output doesn't show properly with only one or the other. So it's safer to include both.


Historically, Line Feed would move down a line but not return to column 1:

This  
    is  
        a  
            test.

Similarly Carriage Return would return to column 1 but not move down a line:

This  
is  
a  
test.

Paste this into a text editor and then choose to "show all characters", and you'll see both characters present at the end of each line. Better safe than sorry.



来源:https://stackoverflow.com/questions/38764176/difference-between-chr13-and-chr10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!