Cls (computing). commands or hand
25 July 2008
cls (for clear screen) is a command used by COMMAND.COM and cmd.exe to clear the screen or console window of commands and any output generated by them. It does not clear the user’s history of commands, however. In most other environments, like for instance Linux and Unix the same functionality is provided by the clear command.
While the ultimate origins of using the three-character string cls as the command to clear the screen likely predate Microsoft’s use, this command was present before its MS-DOS usage, in the embedded ROM BASIC dialects Microsoft wrote for early 8-bit microcomputers (such as TRS-80 Color BASIC), where it served the same purpose. The MS-DOS dialects of BASIC written by Microsoft, BASICA and GW-BASIC, also have the cls command as a BASIC keyword. The cls command is not present in the BASIC versions for Microsoft Windows (such as Visual Basic) where clearing the screen does not make sense because the program’s user interface is managed by the operating system while the program runs.
The command cls has appeared as a clear screen command in many other BASIC dialects and command interpreters, because of its familiarity through being included in MS-DOS.
No comments yet
Leave a Reply
You must be logged in to post a comment.