Forgot your password?  


Argument | Research & Encyclopedia Articles

Print-Friendly   Order the PDF version   Order the RTF version
About 2 pages (453 words)
Parameter (computer science) Summary

 


Argument

In all programming languages and command line interfaces, certain words, phrases, and codes that are entered in the program--or at a line prompt--instruct the computer's processor to perform specific functions. In DOS, for instance, the command "CLS" instructs the computer to clear the screen of all information, leaving only a new command prompt ready for the next instruction. In the programming language BASIC, the command "RETURN" is used at the end of a short set of instructions nestled within a program (also termed a subroutine) to cause the computer to return to the point in the program where it was asked to run the subroutine. The "CLS" and "RETURN" commands are words that, when entered alone, generate a response from the computer. Not all commands, however, perform a function on their own.

For example, when formatting a disk from a computer's DOS prompt, the command "FORMAT" is used. When entered by itself, however, the computer does not understand what action the user wishes to be performed. Does the user want to erase the entire hard drive or prepare a floppy disk for storage of a research report for school? The "FORMAT" command requires what is known as an argument--an additional value or reference that is passed with a function or procedure to further specify what action is to be executed by the computer. In this case, the user would like to format a floppy disk, the user enters "FORMAT A:" in the command line of DOS.

The "A:" is the argument of the formatting function, as it specifies that the task be performed on a floppy disk. Similarly, the command "SQRT" in some programming languages asks the computer to return the square root of a value. This value is the argument of the square root function. "SQRT(9)" has 9 as its argument and returns a value of 3.

Some commands are able to pass several arguments at once. A simple example is the command "DIR," used in DOS to display a list of files and folders contained in a directory. While "DIR" entered alone in the command line returns a list of the current folder's contents, arguments placed after the command can specify a more exact response. The command "DIR C:\MUSIC" will return only the list of those files contained in the "MUSIC" folder of the C: drive. If the user feels that the preceding command will display so many files that they will not fit on the screen, he may enter "DIR C:\MUSIC /P." The second argument "/P" placed after the "C:\MUSIC" argument instructs the computer to pause after each full screen of files contained in the "MUSIC" folder is listed. Typically, multiple arguments are separated by spaces, but not all languages require it.

This is the complete article, containing 453 words (approx. 2 pages at 300 words per page).

More Information
  • View Argument Study Pack
  • Search Results for "Argument"
  • More Products on This Subject
    Parameter Declaration
    A parameter declaration tells the compiler the name of the function and the number, type and order ... more

    Parameter List
    A parameter list, sometimes called an argument list, is a sequence of parameter declarations found ... more


    Ask any question on Parameter (computer science) and get it answered FAST!
    Answer questions in BookRags Q&A and earn points toward
    discounted or even FREE Study Guides and other BookRags products!
    Learn more about BookRags Q&A
    Copyrights
    Argument from World of Computer Science. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.

    Join BookRagslearn moreJoin BookRags

    Join BookRagslearn moreJoin BookRags