Cls (computing)
Encyclopedia
cls is a command
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....

 used by the command line interpreters COMMAND.COM
COMMAND.COM
COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...

and cmd.exe
Cmd.exe
Command Prompt is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems...

on DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

, OS/2
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 and Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 operating systems to clear the screen or console window
Terminal emulator
A terminal emulator, terminal application, term, or tty for short, is a program that emulates a video terminal within some other display architecture....

 of commands and any output generated by them. It does not clear the user's history of commands
Command History
Command history is a feature in many operating system shells, computer algebra programs, and other software that allows the user to recall, edit and rerun previous commands....

, however. In other environments, such as Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

, the same functionality is provided by the clear
Clear (Unix)
' is a standard Unix computer operating system command which is used to clear the screen.Depending on the system, clear uses the terminfo or termcap database, as well as looking into the environment for the terminal type in order to deduce how to clear the screen. The Unix command clear takes no...

command.

While the ultimate origins of using the three-character string cls as the command to clear the screen likely predate Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

's use, this command was present before its MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 usage, in the embedded ROM BASIC
BASIC
BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use - the name is an acronym from Beginner's All-purpose Symbolic Instruction Code....

 dialects Microsoft wrote for early 8-bit
8-bit
The first widely adopted 8-bit microprocessor was the Intel 8080, being used in many hobbyist computers of the late 1970s and early 1980s, often running the CP/M operating system. The Zilog Z80 and the Motorola 6800 were also used in similar computers...

 microcomputer
Microcomputer
A microcomputer is a computer with a microprocessor as its central processing unit. They are physically small compared to mainframe and minicomputers...

s (such as TRS-80
TRS-80
TRS-80 was Tandy Corporation's desktop microcomputer model line, sold through Tandy's Radio Shack stores in the late 1970s and early 1980s. The first units, ordered unseen, were delivered in November 1977, and rolled out to the stores the third week of December. The line won popularity with...

 Color BASIC
Color BASIC
Color BASIC is the implementation of Microsoft BASIC that is included in the ROM of the Tandy/Radio Shack TRS-80 Color Computers manufactured between 1980 and 1991. BASIC is a high level language with simple syntax that makes it easy for novices to write simple programs. BASIC is interpreted,...

), where it served the same purpose. The MS-DOS dialects of BASIC written by Microsoft, BASICA and GW-BASIC
GW-BASIC
GW-BASIC was a dialect of the programming language BASIC developed by Microsoft from BASICA, originally for Compaq. It is compatible with Microsoft/IBM BASICA, but was disk based and did not need the ROM BASIC. It was bundled with MS-DOS operating systems on IBM PC compatibles by Microsoft...

, also have the cls command as a BASIC keyword. The cls command is also present in BASIC versions for Microsoft Windows, however this generally clears text printed on the form, rather than the whole screen or controls on the form.

The command cls has appeared as a clear screen command in many other BASIC dialects and command line interpreters, because of its familiarity through being included in MS-DOS.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK