Skip to content

Add query for terminal size #982

@zoziha

Description

@zoziha
Contributor

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

Activity

added
ideaProposition of an idea and opening an issue to discuss it
on Apr 21, 2025
linked a pull request that will close this issue on Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaProposition of an idea and opening an issue to discuss it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @zoziha

      Issue actions

        Add query for terminal size · Issue #982 · fortran-lang/stdlib