You likely want to also use the -t option so that the module is required. Here's an example:
% cat try.rkt #lang racket (provide main) (define (main . args) (displayln (cons "HELLO:" args))) % racket -tm try.rkt there (HELLO: there) On Sat, Dec 17, 2022 at 11:50 AM [email protected] <[email protected]> wrote: > racket --help says: > > -m, --main > Call `main` with command-line arguments, print results > > but I cannot get this to work. All I get is > > main: not defined or required into the top-level environment > > in all (to me) conceivable variants. Could anyone provide an actually > working example? > Please don't recommend books or so, I have a life. > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/beaa2ef6-afd2-4686-829a-390eb69f5620n%40googlegroups.com > . > > Beyond the Racket Users Google Group, Racket Discussions take place on > Discourse ( https://racket.discourse.group/ ) and Discord ( > https://discord.gg/6Zq8sH5 ). Discussion (but less active) also takes > place on the Racket Slack https://racket.slack.com/ ( sign up at > https://racket-slack.herokuapp.com/ ), and IRC #racket > https://kiwiirc.com/nextclient/irc.libera.chat/#racket > --- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/10d44364-fafb-4ead-9b35-2ed5a70f827fn%40googlegroups.com > <https://groups.google.com/d/msgid/racket-users/10d44364-fafb-4ead-9b35-2ed5a70f827fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/beaa2ef6-afd2-4686-829a-390eb69f5620n%40googlegroups.com. Beyond the Racket Users Google Group, Racket Discussions take place on Discourse ( https://racket.discourse.group/ ) and Discord ( https://discord.gg/6Zq8sH5 ). Discussion (but less active) also takes place on the Racket Slack https://racket.slack.com/ ( sign up at https://racket-slack.herokuapp.com/ ), and IRC #racket https://kiwiirc.com/nextclient/irc.libera.chat/#racket --- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAGuFJS-5Eq3h3NCdLm7-HNDvtLfxk6hoiLQwfOyZkCnKT_G-gQ%40mail.gmail.com.

