Dictionary entry

arg

nouninformal

Last updated

UK/ɑːɡ/
US/ɑːrɡ/

Meanings

  1. nouncountableinformalcomputing

    A short form of 'argument'; in computing, a value that is passed to a function or command.

    Grammar: Used mainly in programming contexts; often in the plural 'args'.

    Patterns

    • pass an arg to something
    • an arg to a function

    The function takes two args: a string and a number.

    Make sure you pass the correct args to the command, or it will fail.

    You can use keyword args to make the call clearer.

  2. nouncountableinformalBritish

    An argument or disagreement, especially a short one.

    Grammar: Informal and mostly British; common in the phrase 'have an arg'.

    Patterns

    • have an arg with someone
    • an arg about something

    They had a bit of an arg about whose turn it was to cook.

    I don't want an arg with you over something so small.

Word forms

pluralargs

Common combinations

pass an arg
You need to pass an arg to the function to set the color.
command-line arg
The program reads command-line args to know which file to open.
keyword arg
Using a keyword arg makes the code easier to read.
have an arg
They had an arg and then made up.

Synonyms and how they differ

argument
The full form; use it in formal writing and when not in a programming context.
parameter
In computing, a parameter is the variable in the function definition, while an arg is the actual value you pass.
quarrel
A more formal word for a disagreement; 'arg' is very informal and mainly British in this sense.

Commonly confused: arg or args?

arg vs args

The plural form; be careful not to use 'arg' when you mean more than one.

Practice

In programming, what do you call the value you pass to a function?

Make it your own

Write a sentence using “arg”, then check it and compare it with the examples above.

Your sentence stays on this page and is not sent anywhere.

Explore more words