Command-line arguments: Difference between revisions
Added C3
VincentARM (talk | contribs) (add task to aarch64 assembly raspberry pi 3) |
(Added C3) |
||
Line 687:
std::cout << "The argument #" << i << " is " << argv[i] << '\n';
}</syntaxhighlight>
=={{header|C3}}==
Command line arguments are passed to main and will be converted to UTF-8 strings on all platforms.
<syntaxhighlight lang="c3">import std::io;
fn void main(String[] args)
{
io::printfn("This program is named %s.", args[0]);
for (int i = 1; i < args.len; i++)
{
io::printfn("the argument #%d is %s\n", i, args[i]);
}
}</syntaxhighlight>
=={{header|Clean}}==
|