________________________________ From: Marc Feeley feeley@iro.umontreal.ca To: Adrien Piérard pierarda@iro.umontreal.ca Cc: Gambit List gambit-list@iro.umontreal.ca Sent: Monday, August 22, 2011 6:32 AM Subject: Re: [gambit-list] REPL, values and '#'
On 2011-08-22, at 2:09 AM, Adrien Piérard wrote:
Hello,
Given that '#' is supposed to be a placeholder for the latest returned value, I'd expect
(values 1 2)
1 2
#
1 2
instead of
(values 1 2)
1 2
#
2
Or at least, the returned value to be the first one of multiple values, not the last.
I think that it's not common to use # and values together in the REPL, but I find the above behaviour not very natural.
Personally I find it more natural, and simpler, to think of each result printed by the REPL being added to the REPL history in the order printed. That's why # always refers to the last result printed, which will be the last value if multiple values were the result of the interaction. For example:
777
777
(values 111 222)
111 222
#
222
777
777
(values 111 222)
111 222
##
111
777
777
(values 111 222)
111 222
###
777
Marc
---
On my Windows 7x64 system I get the following:
CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.6.5 windows-mingw32-x86 [ manyargs dload ptables ] compiled Fri 03/25/2011 on hermes (MinGW)
#;1> (values 111 222) 111 222 ; 2 values #;2> # 111 #;3>
Steve _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list