在Fortran中,有没有可能在控制台中隐藏游标的运行时间?
我已经编写了一个特定的软件,该软件可以生成6个不同范围内随机数的文件在Fortran中,有没有可能在控制台中隐藏游标的运行时间?,fortran,intel-fortran,Fortran,Intel Fortran,我已经编写了一个特定的软件,该软件可以生成6个不同范围内随机数的文件 但是,我想在运行时隐藏光标 •有什么可行的方法吗? •更新• ::回答来自 解决案例在第1篇文章中使用内容:: “首先,打印转义码将隐藏光标。 “将重新启用它。” write(*,*)char(27)//char(91)//char(63)//char(50)//char(53)//char(108) !由于某些原因,使用'result=systemqq' !只能强制屏幕“应用”上面的行 !在这之后,逃走在窗户里工作! r
有什么可行的方法吗?
•更新•
::回答来自
解决案例在第1篇文章中使用内容::
“首先,打印转义码将隐藏光标。
“将重新启用它。”
write(*,*)char(27)//char(91)//char(63)//char(50)//char(53)//char(108)
!由于某些原因,使用'result=systemqq'
!只能强制屏幕“应用”上面的行
!在这之后,逃走在窗户里工作!
result=systemqq('@cls&@%windir%'//char(92)//'system32'//'char(92)//'chcp.exe 850 2>nul>nul 1有两种方法
首先,打印转义码\e[?25l
将隐藏光标。\e[?25h
将重新启用光标
第二,致电:
哦,我以为你指的是鼠标光标。你指的是终端\u
光标吗?嗨@itnotme,我把我的答案回滚到原来的答案。谢谢!谢谢!!现在问题和答案有意义了:)
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)
BOOL WINAPI SetConsoleCursorInfo(
_In_ HANDLE hConsoleOutput,
_In_ const CONSOLE_CURSOR_INFO *lpConsoleCursorInfo
);