100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 在命令提示符输出c语言代码_您可以在Windows命令提示符中更改输出缓冲区的大小吗?...

在命令提示符输出c语言代码_您可以在Windows命令提示符中更改输出缓冲区的大小吗?...

时间:2019-02-07 06:40:06

相关推荐

在命令提示符输出c语言代码_您可以在Windows命令提示符中更改输出缓冲区的大小吗?...

在命令提示符输出c语言代码

If you are someone who loves using the Windows Command Prompt, you may have found yourself curious as to why the screen output buffer has such a ‘large’ default size. Can you change it to a smaller (or even larger) size? Today’s SuperUser Q&A post has the answers.

如果您是喜欢使用Windows命令提示符的人,您可能会发现自己对为什么屏幕输出缓冲区具有如此大的默认大小感到好奇。 您可以将其更改为较小(甚至更大)的尺寸吗? 今天的“超级用户问答”帖子已经给出了答案。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

问题 (The Question)

SuperUser reader Jay wants to know why the default Windows Command Prompt output buffer size is so large:

SuperUser阅读器Jay想知道为什么默认的Windows Command Prompt输出缓冲区大小如此之大:

I have been using the Command Prompt in Windows for a while now and just realized that there are several pages worth of empty lines below the text entry prompt. Why is that?

我已经在Windows中使用命令提示符已有一段时间了,只是意识到在文本输入提示下有几页空白行。 这是为什么?

Why is the default Windows Command Prompt output buffer size so large? Can its size be altered?

为什么默认的Windows命令提示符输出缓冲区大小如此之大? 可以改变尺寸吗?

答案 (The Answer)

SuperUser contributors Steven and miltonb have the answer for us. First up, Steven:

超级用户贡献者Steven和Miltonb为我们提供了答案。 首先,史蒂文:

The “empty lines” are the rows of screen buffer that have not been filled with output yet. To change the screen buffer size from the default of 300 lines (Microsoft’s chosen default), perform the following steps:

“空行”是屏幕缓冲区中尚未填充输出的行。 要将屏幕缓冲区大小从默认的300行(Microsoft选择的默认值)更改,请执行以下步骤:

Open the Windows Command Prompt打开Windows命令提示符 Right-click on the application’s icon in the upper left corner of the window右键单击窗口左上角的应用程序图标

Click onPropertiesin the drop down menu

在下拉菜单中单击属性

Select theLayout Tab

选择布局选项卡

Set theScreen Buffer Size (Height Listing)to 20

将屏幕缓冲区大小(列表高度)设置为20

ClickOK

点击确定

Note:I recommend reverting the buffer size to something larger since 20 lines is not much in the way of displayed output.

注意:我建议将缓冲区大小恢复为更大的大小,因为20行显示的输出不会太多。

Followed by the answer from miltonb:

随后是miltonb的回答:

I know that this is not the “why” with regard to your question, but if you want to change the screen buffer size from within a Command Prompt window (or batch file), you can make use of themode command(mode columns, lines). I regularly use this from within the command prompt:

我知道这不是问题的“原因”,但是如果您想在命令提示符窗口(或批处理文件)中更改屏幕缓冲区的大小,则可以使用mode命令(mode列,行)。 我经常在命令提示符下使用它:

mode 200, 300模式200、300

Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程。

翻译自: /235765/can-you-change-the-output-buffer-size-in-the-windows-command-prompt/

在命令提示符输出c语言代码

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。