Dictionary entry
arg
Last updated
Meanings
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.
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
| plural | args |
|---|
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?
Choose one answer.
'Arg' is short for 'argument' and means a value passed to a function. 'Return' is what the function gives back, 'loop' is a repeated block, and 'syntax' is the rules of the language.
Make it your own
Write a sentence using “arg”, then check it and compare it with the examples above.