都说按enter键回车换行,那回车和换行有什么区别呢

如题所述

我们平时所说的回车就是指回车换行的,要是单纯的光指回车的话是这样的:
例:
11111111111111111111112|
假如现在光标在2后面的位置:在程序设计中要是单纯的指回车不换行的话光标会出现在3的前面如下:
|31111111111111111111112

要是回车换行的话光标就是出现在4的位置如下:
11111111111111111111112
|4
不在平常的情况下没有特定的要求,我们说的回车就是指回车换行的。

参考资料:http://zhidao.baidu.com/question/114668788.html

温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-12-01
在文字编辑时,回车键的作用是换行,在输入网址时回车键的作用是“转到”,在执行DOS命令时,回车键的作用是执行

“回车键”的来历,还得从机械的英文打字机说起。在打字机上,有一个部件叫“字车”,每输入一个单词,“字车”就前进一格。当输满一行后,使用者就要推动“字车”到起始位置,这时打字机会有两个动作:“字车”归位、滚筒上卷一行(相当于“字车”下移一行),以便开始输入下一行,这种推动“字车”的动作叫“回车”。
第2个回答  2011-12-01
MSDN中查到这样的话:Also, in text mode, carriage return–linefeed combinations are translated into single linefeeds on input, and linefeed characters are translated to carriage return–linefeed combinations on output. (输入的情况下,换行回车转换成换行,然后输出时换行又会转成换行回车)When a Unicode stream-I/O function operates in text mode (the default), the source or destination stream is assumed to be a sequence of multibyte characters. Therefore, the Unicode stream-input functions convert multibyte characters to wide characters. For the same reason, the Unicode stream-output functions convert wide characters to multibyte characters.

详细出处参考:http://www.jb51.net/article/26547.htm
第3个回答  2011-11-18
Enter键又叫回车键, 按下回车键后才可以实现 “ 换行 ”的操作。

一个是键盘上的按键,一个是按键实现的效果。本回答被网友采纳
相似回答