Motivation
Fortran is often used to develop console backend programs. In certain scenarios, there may be a need to obtain the terminal size to display content appropriately.
Similar to Python, this routine is suitable to be placed in stdlib_system (OS, Operating System).
Prior Art
- C/C++:
- Unix/Linux: Obtain the
winsize structure through the ioctl system call and the TIOCGWINSZ command;
- Windows: Use the
GetConsoleScreenBufferInfo API to obtain console buffer information.
- os.get_terminal_size in Python.
Additional Information
No response
Motivation
Fortran is often used to develop console backend programs. In certain scenarios, there may be a need to obtain the terminal size to display content appropriately.
Similar to Python, this routine is suitable to be placed in
stdlib_system(OS, Operating System).Prior Art
winsizestructure through theioctlsystem call and theTIOCGWINSZcommand;GetConsoleScreenBufferInfoAPI to obtain console buffer information.Additional Information
No response