Jump to content

Program name: Difference between revisions

Added COBOL
(Added COBOL)
Line 425:
(when (.contains (first *command-line-args*) *source-path*)
(apply -main (rest *command-line-args*)))</lang>
 
=={{header|COBOL}}==
{{works with|GnuCOBOL}}
COBOL has an internal PROGRAM-ID name, and then the external invocation name.
 
<lang COBOL> identification division.
program-id. sample.
 
data division.
working-storage section.
01 progname pic x(16).
 
procedure division.
sample-main.
 
display 0 upon argument-number
accept progname from argument-value
display "argument-value zero :" progname ":"
 
display "function module-id :" function module-id ":"
 
goback.
end program sample.</lang>
 
{{out}}
<pre>prompt$ cobc -xj progname.cob
argument-value zero :./progname :
function module-id :sample:</pre>
 
=={{header|CoffeeScript}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.