This question has definitely been asked before, here. Some of the solutions presented did work(in Windows) except for the command-line
function mentioned in Command-line access and exit values in r6rs-lib
.
I managed to achieve what I wanted in Gauche
(non r6rs compliant implementation) using *argv*
:
(display *argv*)
> gosh test.ss first 1 2 3 4 5 6 7 8 9 10 11 12 13
>> (first 1 2 3 4 5 6 7 8 9 10 11 12 13)
I want to do the same with Petite Chez Scheme
which is r6rs
compliant using the command-line
function. I've tried to use the code in that chapter but all I get is a list with the script's name and only the first argument. e.g
#!r6rs
(import (rnrs programs (6)))
(display (command-line))
> petite --script test.ss first second
>> (test.ss first)
Is there some other library import I'm missing that would make it work?