Program name: Difference between revisions

(Added F#)
Line 1,452:
 
=={{header|Smalltalk}}==
 
{{works with|GNU Smalltalk}}
Note that this only works when run as "./scriptname.st", because the shebang must force the script name onto ARGV.
 
Line 1,461 ⟶ 1,463:
program := Smalltalk getArgv: 1.
 
Transcript show: 'Program: ', program; cr.</lang>
 
{{works with|Smalltalk/X}}
Works when run in script mode or in a workspace.
 
<lang smalltalk>| program |
 
program := Smalltalk commandLine first.
Transcript show: 'Program: ', program; cr.</lang>
 
Anonymous user