Command-line arguments: Difference between revisions
Content added Content deleted
(Adds slope example) |
(Added Odin variant) |
||
Line 1,827: | Line 1,827: | ||
% ocaml arg.ml |
% ocaml arg.ml |
||
false 0 <nowiki>''</nowiki> |
false 0 <nowiki>''</nowiki> |
||
=={{header|Odin}}== |
|||
<syntaxhighlight lang="odin">package main |
|||
import "core:os" |
|||
import "core:fmt" |
|||
main :: proc() { |
|||
fmt.println(os.args) |
|||
} |
|||
// Run: ./program -c "alpha beta" -h "gamma" |
|||
// Output: ["./program", "-c", "alpha beta", "-h", "gamma"] |
|||
</syntaxhighlight> |
|||
=={{header|Oforth}}== |
=={{header|Oforth}}== |