本文介绍了chr(13)和chr(10)之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Crystal Reports中的 chr(13) chr(10)有什么区别?

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

我知道 chr(13)被用作换行符。但是我们的报告之一使用以下行:

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

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


推荐答案

Chr(10)是换行符, Chr(13)是回车符。

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.

从历史上看,换行符会向下移动一行,但不会返回到第1列:

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

This  
    is  
        a  
            test.

类似的回车将返回第1列,但下移一行:

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.

这篇关于chr(13)和chr(10)之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 21:26