[UCBLogo] Is this a bug? 
Author Message
 [UCBLogo] Is this a bug?

Yes, that is exactly the problem, I think the function "quoted" should be a
primitive and should take care of that kind of things.

Daniel

Quote:


> > to a
> > foreach [(2)] [op ?]
> > end

> > show a

> > (nothing)

> > Daniel

> It is interesting that you get the same behavior with
>     to b
>        op "(2)
>     end
> However with
>     to b
>        op 2
>     end
> the instruction
>     show b
> outputs 2.  I think this happens because words are delimited by spaces,
> square brackets, and parentheses.  Hence "(2) is an empty word followed
> by (2).  op never sees beyond the empty word.  In the case of the
> procedure a, the (2) inside the square brackets is read as "(2), that is, as
> an empty word.

To unsubscribe from this group, send an email to:

LogoForum messages are archived at:
http://www.*-*-*.com/

Your use of Yahoo! Groups is subject to http://www.*-*-*.com/



Wed, 05 May 2004 11:54:47 GMT  
 [UCBLogo] Is this a bug?
I think Brian is loathed to introduce primatives that
automatically quote args :-)

In TKTS Logo, I've introduced a primative 'quote' that works
similar to '"', however I've also introduced single-quoted
strings, thus:
show '(2)'
which ensures no surprises. Note that this is subtly
different to "|(2)| in that it's semantically like "\(2\) .

I tried the your procedure in TKTS Logo which implements
foreach as a primative.

to a
    foreach [(2)] [op ?]
end

show a

and I get (2)
Which is what I expect as the parameter should not be
re-evaluated. I.e., it should be treated as
apply [op ?] [(2)]

cf

to b
    apply [op ?] [(2)]
end

will get (2) in both ucblogo and TKTS Logo.

Jamie

Quote:
> -----Original Message-----


Ajoy
> Sent: Friday, November 16, 2001 6:50 AM

> Subject: [LogoForum] Re: [UCBLogo] Is this a bug?

> Yes, that is exactly the problem, I think the function
> "quoted" should be a
> primitive and should take care of that kind of things.

> Daniel



> > > to a
> > > foreach [(2)] [op ?]
> > > end

> > > show a

> > > (nothing)

> > > Daniel

> > It is interesting that you get the same behavior with
> >     to b
> >        op "(2)
> >     end
> > However with
> >     to b
> >        op 2
> >     end
> > the instruction
> >     show b
> > outputs 2.  I think this happens because words are
> delimited by spaces,
> > square brackets, and parentheses.  Hence "(2) is an
empty
> word followed
> > by (2).  op never sees beyond the empty word.  In the
case of the
> > procedure a, the (2) inside the square brackets is read
as
> "(2), that is, as
> > an empty word.

> To unsubscribe from this group, send an email to:

> LogoForum messages are archived at:
> http://groups.yahoo.com/group/LogoForum

> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/

To unsubscribe from this group, send an email to:

LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



Wed, 05 May 2004 11:56:19 GMT  
 [UCBLogo] Is this a bug?

Quote:

>Yes, that is exactly the problem, I think the function "quoted" should be a
>primitive and should take care of that kind of things.

Making QUOTED a primitive wouldn't change anything; the issue is how " decides
where to stop quoting.  I think perhaps QUOTED could be fixed by redefining
it as

to quoted :thing
output list "first (list :thing)
end

but then programs that use QUOTED would have to use SENTENCE to combine
this result with the rest of the instruction they're building, which would
be a non-backward-compatible change.

Basically the right thing is to avoid QUOTED altogether, I think!



Thu, 06 May 2004 01:06:25 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. UCBLogo 5.2 bugs fixed

2. Bug: UCBLOGO and Windows 2000

3. Bug: UCBLOGO and Windows 2000

4. [UCBLogo] Is this a bug?

5. System Bug, Or Am I Really Dense?

6. A major bug or am i Crazy (or BOTH)

7. I am clinically stupid. (fastcgi.rb bug)

8. re bug, or am I missing something?

9. BUGS, BUGS, BUGS, BUGS, C4 BUGS

10. I am not deaf, but am I mute?

11. PopupMenu bug, menu bug, apple bug (worm)?

12. History mechanism in ucblogo?

 

 
Powered by phpBB® Forum Software