Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
void main(int argc, char *argv[]) { char *x = argv[1]; }
int main(int argc, char *argv[]) { vector<string> args(1 + argv, argc + argv); string x = args.at(0); }
static void Main(string[] args) { string x = args[0]; }
auto x = args[1];
main(args) { var x = args[0]; }
character(len=:), allocatable :: x integer :: n call get_command_argument (1, length=n) allocate (character(n):: x) call get_command_argument (1, x)
x <- return.head =<< System.Environment.getArgs
const x = process.argv[2]
String x = args[0];
x = arg[1]
$x = $argv[1];
var _x: String; begin _x := ParamString(1); end.
$x = $ARGV[0];
x = ARGV.first