Command-line arguments: Difference between revisions
Content added Content deleted
(→{{header|Common Lisp}}: add a function for a univorm way to access arguments) |
|||
Line 252: | Line 252: | ||
=={{header|Common Lisp}}== |
=={{header|Common Lisp}}== |
||
The Common Lisp standard does not specify anything relating to external invocation of a Common Lisp system. The method for getting command-line arguments varies by implementation |
The Common Lisp standard does not specify anything relating to external invocation of a Common Lisp system. The method for getting command-line arguments varies by implementation. |
||
The following function could be used to create a uniform way to access the arguments: |
|||
{| |
|||
! Implementation !! Expression !! Includes program name (argv[0]) |
|||
|- |
|||
⚫ | |||
|- |
|||
⚫ | |||
|} |
|||
<lang lisp>(defun argv () |
|||
All of these return a list of strings. |
|||
(or |
|||
⚫ | |||
#+LISPWORKS system:*line-arguments-list* |
|||
#+CMU (cons "cmucl" extensions:*command-line-words*) |
|||
⚫ | |||
nil))</lang> |
|||
=={{header|D}}== |
=={{header|D}}== |