Top "Arguments" questions

An argument is a value passed to a function, procedure, or command line program.

if arguments is equal to this string, define a variable like this string

I am doing some bash script and now I got one variable call source and one array called samples, like …

bash scripting arguments
Is there a better way to do optional function parameters in JavaScript?

I've always handled optional parameters in JavaScript like this: function myFunc(requiredArg, optionalArg){ optionalArg = optionalArg || 'defaultValue'; // Do stuff } Is there …

javascript function arguments
JavaScript variable number of arguments to function

Is there a way to allow "unlimited" vars for a function in JavaScript? Example: load(var1, var2, var3, var4, var5, …

javascript function arguments argument-passing
"Parameter" vs "Argument"

I got parameter and argument kind of mixed up and did not really pay attention to when to use one …

function parameters language-agnostic arguments terminology
How to Parse Command Line Arguments in C++?

Possible Duplicate: What parameter parser libraries are there for C++? What is the best way of parsing command-line arguments in …

c++ command-line arguments
How to pass arguments to a Button command in Tkinter?

Suppose I have the following Button made with Tkinter in Python: import Tkinter as Tk win = Tk.Toplevel() frame = Tk.…

python python-3.x button tkinter arguments
Mockito match any class argument

Is there a way to match any class argument of the below sample routine? class A { public B method(Class&…

java class mockito arguments matcher
How to write a bash script that takes optional input arguments?

I want my script to be able to take an optional input, e.g. currently my script is #!/bin/bash …

bash arguments parameter-passing
How to pass command-line arguments to a PowerShell ps1 file

For years, I have used the cmd/DOS/Windows shell and passed command-line arguments to batch files. For example, I …

command-line powershell arguments
Meaning of "[: too many arguments" error from if [] (square brackets)

I couldn't find any one simple straightforward resource spelling out the meaning of and fix for the following BASH shell …

bash if-statement arguments