【问题标题】:Free Pascal : Console text modification (Beginner)Free Pascal:控制台文本修改(初学者)
【发布时间】:2014-01-08 20:20:20
【问题描述】:

我的问题很简单,我想知道是否可以使用 free pascal(没有 delphi 或其他任何东西)来“编辑”使用函数 write() 编写在控制台中的文本(或另一个做同样的事情) .

例如:

Program Test;
Begin
 Writeln('This is a test');
 FUNCTION('This test has been edited');
End.

输出:

This test has been edited

我知道我可以这样做:

Program Test;
Uses crt;
Begin
 Writeln('This is a test');
 ClrScr;
 Writeln('This test has been edited');
End.

但我不想使用 ClrScr。

感谢您的帮助。

【问题讨论】:

    标签: dynamic text console edit freepascal


    【解决方案1】:

    试试GotoXY(X, Y)函数

     Writeln('This is a test');
     Readln;
     GotoXY(1, 1);
     Writeln('This test has been edited');
     Readln;               
    

    【讨论】:

      猜你喜欢
      • 2016-11-18
      • 1970-01-01
      • 2019-02-23
      • 1970-01-01
      • 1970-01-01
      • 2012-06-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多