chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] command-line-arguments


From: Peter Bex
Subject: Re: [Chicken-users] command-line-arguments
Date: Fri, 10 Oct 2008 16:19:39 +0200
User-agent: Mutt/1.4.2.3i

On Fri, Oct 10, 2008 at 04:04:13PM +0200, Wietse Jacobs wrote:
> Hello,
> 
> I've put the following in a file and compiled it with chicken:
> 
> (begin
>   (display (command-line-arguments))
>   (exit))
> 
> when I run this with:
> test.exe "1 argument"
> I get:
> (1 argument)
> 
> But this looks like a list of 2 arguments where I expected 1. Am I
> missing something?

That's (kind of) a limitation of how 'display' works.
#;1> (display (list "foo" "bar"))
(foo bar)

Instead, you want:
#;2> (printf "~S" (list "foo" "bar"))
("foo" "bar")

> (I'm on windows XP, Chicken Version 3.0.0 - windows-mingw32-x86)
> 
> Thanks for your time,
> -- 
> --Wietse

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgp3bXIkFTgCf.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]