[racket] Getting program options/arguments?
On Thu, Sep 16, 2010 at 13:59, Isaiah Gilliland <jonsulred at gmail.com> wrote:
> I know many programs that accept input while calling the program like:
> "program -o option" I'd really like to use this for my next few projects but
> I'm not even really sure where to even look for information. I've been
> scouring the racket I/O docs and even the r6rs docs, but haven't found
> anything for this in the I/O sections. I've tried playing around with
> creating input ports and everything but they don't get the parameters :/
> I was hoping there was somebody out there that can point me in the right
> direction lol
>
>
Is `current-command-line-arguments' what you are looking for?
You can also define a `main' function which arguments are taken from the
command line if you call
racket my-file.rkt --main arg1 arg2 ...
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100916/d39052bb/attachment.html>