Program name: Difference between revisions

Jakt
(→‎Joy: add)
(Jakt)
Line 976:
 
exit ''</syntaxhighlight>
 
=={{header|Jakt}}==
The name of the program is stored in the first index of the array passed to main. This is the name of the compiled executable, so when using jakt -cr the value will be a path starting with build/.
 
<syntaxhighlight lang="jakt">
fn main(arguments: [String]) {
let program_name = arguments[0]
println("{}", program_name)
}
</syntaxhighlight>
 
=={{header|Java}}==
89

edits