有没有可能在Fortran控制台中隐藏游标间运行时的方法?

时间:2019-04-08 17:30:04

标签: fortran intel-fortran

  • 我已经编写了一个特定的软件,该程序可以运行以生成6个文件,它们的随机数在不同的范围内。

  • 但是,我想在运行时隐藏 光标

  
    

Is there any possible way to do this?

  

enter image description here


  

• Update •

来自 @Daniel R Livingston

  
    

解决 案件,并在第一篇文章中采用未成年人适应措施::

         

”“首先,打印转义码 \e[?25l 将隐藏光标。

         

\e[?25h 将重新启用它。”

  
write (*,*)char(27)//char(91)//char(63)//char(50)//char(53)//char(108)

! for some reason, by using the 'result = systemqq' 
! may force the screen to "apply" the line above, only 
! after this, that escape gone works in Windows!

result = systemqq('@cls &@%windir%'//char(92)//'system32'//char(92)//'chcp.exe 850 2>nul >nul 1<&2&@color 0a')
write (*,*)char(27)//'[37;41;4m'//char(255)//char(250)//char(255)//'Generating',x,' Random Numbers!',char(27)
           &//'[0m'//char(10)//char(10)

!    Obs.: --------------------------------------------------------------------
!    Turn the cursor back by adding:
!    write (*,*),char(27)//'[?25h'  before end program (latest line) 
!     \e[?25l == char(27)//char(91)//char(63)//char(50)//char(53)//char(108)

enter image description here

1 个答案:

答案 0 :(得分:1)

两种方法。

首先,打印转义码\e[?25l将隐藏您的光标。 \e[?25h将重新启用它。

第二,通过调用How to manage REST API versioning with spring data rest?

BOOL WINAPI SetConsoleCursorInfo(
  _In_       HANDLE              hConsoleOutput,
  _In_ const CONSOLE_CURSOR_INFO *lpConsoleCursorInfo
);