Program name: Difference between revisions

Add Ecstasy example
No edit summary
(Add Ecstasy example)
 
(2 intermediate revisions by 2 users not shown)
Line 351:
 
: _start ( rsp -- noret ) arg0 print-arg bye ;</syntaxhighlight>
 
=={{header|BQN}}==
<syntaxhighlight lang="bqn">•name</syntaxhighlight>
 
=={{header|C}}==
Line 696 ⟶ 699:
→ "http://www.echolalie.org/echolisp/"
</syntaxhighlight>
 
=={{header|Ecstasy}}==
<syntaxhighlight lang="ecstasy">
module WhatIsMyName {
@Inject Console console;
 
void run() {
console.print($"program name: {this:module}");
}
}
</syntaxhighlight>
 
{{out}}
<pre>
program name: WhatIsMyName
</pre>
 
=={{header|Elena}}==
Line 2,099 ⟶ 2,118:
 
=={{header|Wren}}==
Assuming we're running a script file named "program_nameProgram_name.wren":
<syntaxhighlight lang="ecmascriptwren">import "os" for Process
 
System.print("My name is %(Process.allArguments[1])")</syntaxhighlight>
Line 2,106 ⟶ 2,125:
{{out}}
<pre>
My name is program_nameProgram_name.wren
</pre>
 
162

edits