From: Vladimir V. Zolotych
Subject: (VALUES)
Date: 
Message-ID: <3AEA745F.2DEB80A0@eurocom.od.ua>
In the following excerpt ion from CLHS

HyperSpec/Body/fun_set-dispa_ro-character.html#get-dispatch-macro-character

 (set-dispatch-macro-character #\# #\{        ;dispatch on #{
    #'(lambda(s c n)
        (let ((list (read s nil (values) t)))  ;list is object after #n{
                    ;;          ^^^^^^^^
What is the reason to write (VALUES) instead of NIL ?
Is there any advantages in that ?

          (when (consp list)                   ;return nth element of list
            (unless (and n (< 0 n (length list))) (setq n 0))
            (setq list (nth n list)))
         list)))

-- 
Vladimir Zolotych                         ······@eurocom.od.ua

From: Kent M Pitman
Subject: Re: (VALUES)
Date: 
Message-ID: <sfwbsph172c.fsf@world.std.com>
"Vladimir V. Zolotych" <······@eurocom.od.ua> writes:

> In the following excerpt ion from CLHS
> 
> HyperSpec/Body/fun_set-dispa_ro-character.html#get-dispatch-macro-character
> 
>  (set-dispatch-macro-character #\# #\{        ;dispatch on #{
>     #'(lambda(s c n)
>         (let ((list (read s nil (values) t)))  ;list is object after #n{
>                     ;;          ^^^^^^^^
> What is the reason to write (VALUES) instead of NIL ?

None.  Looks like to me offhand like the editor was editing in his sleep.

> Is there any advantages in that ?

No.  It works, but it will just confuse people.
 
>           (when (consp list)                   ;return nth element of list
>             (unless (and n (< 0 n (length list))) (setq n 0))
>             (setq list (nth n list)))
>          list)))
From: Hartmann Schaffer
Subject: Re: (VALUES)
Date: 
Message-ID: <slrn9emeqr.lqf.hs@paradise.nirvananet>
In article <·················@eurocom.od.ua>, Vladimir V. Zolotych wrote:
>In the following excerpt ion from CLHS
>
>HyperSpec/Body/fun_set-dispa_ro-character.html#get-dispatch-macro-character
>
> (set-dispatch-macro-character #\# #\{        ;dispatch on #{
>    #'(lambda(s c n)
>        (let ((list (read s nil (values) t)))  ;list is object after #n{
>                    ;;          ^^^^^^^^
>What is the reason to write (VALUES) instead of NIL ?

if you write nil, you return the valu NIL.  with (values) there simply is
no function value

-- 

hs

----------------------------------------------------------------

"The cheapest pride is national pride.  I demonstrates the lack of
characteristics and achievements you can be proud of.  The worst loser
can have national pride"  - Schopenhauer
From: Kent M Pitman
Subject: Re: (VALUES)
Date: 
Message-ID: <sfwbspgmrds.fsf@world.std.com>
··@paradise.nirvananet (Hartmann Schaffer) writes:

> 
> In article <·················@eurocom.od.ua>, Vladimir V. Zolotych wrote:
> >In the following excerpt ion from CLHS
> >
> >HyperSpec/Body/fun_set-dispa_ro-character.html#get-dispatch-macro-character
> >
> > (set-dispatch-macro-character #\# #\{        ;dispatch on #{
> >    #'(lambda(s c n)
> >        (let ((list (read s nil (values) t)))  ;list is object after #n{
> >                    ;;          ^^^^^^^^
> >What is the reason to write (VALUES) instead of NIL ?
> 
> if you write nil, you return the valu NIL.  with (values) there simply is
> no function value

Yes and no.  When you do (f (values)), no values are returned UP by values
to the calling point (the code accumulating arguments to F, but when a
value return point receives no values and expects them, it gets supplied
NILs enough to fill, so since one value is needed to become that argument 
to F, (values) and NIL are computationally the same in that position.
(f (values)) is the same as (f nil).  There is no concept of (f <novalues>).