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

Re: LOGO-L> QUESTION ON CONDITIONAL OUTPUTS



I think your idea of a call stack of errors is great.
But could get a bit messy on deeply recursive procedures.

Chuck Shavit wrote:
> 
> George Mills writes:
> 
> > A young programmer should understand the value of
> > good error checking.
> >
> >>         ADDLISTS doesn't like [3 4 A 6] as input
> >
> > Again these arguments seem trivial either way with the
> > ADDLISTS example. But when programs get large and complex
> > with one thing built on top of another good skills in
> > making the code readable and error checking
> > begin to pay back.
> >
> > This could just as easily say:
> >
> > ADDLISTS doesn't like the non numeric element 3 in the input [3 4 A 6]
> 
> I agree to everything George writes in this post.  Good error detection and
> reporting is as important in a library procedure as it is in the guts of
> the interpreter.
> 
> I'd like to add two points:
> 
>   1. Some of the rigorous error reporting can be relexed if a readable
>      traceback is provided.  Something like
>        ADD cannot add a non numeric value.  It had inputs A and 3.
>        It was called from ADDLISTS [A 6] [9 2]
>        Which was called from ADDLISTS [4 A 6] [1 9 2]
>        Which was called from ADDLISTS [3 4 A 6] [8 1 9 2]
>        Which was called from the command line.
> 
>   2. I personally am not crazy about the "humanized" style of Logo messages,
>      like the two examples above.  A computer is just a machine, not a cute
>      being that "likes" some things and "cannot do" other things, IMO.
> 
> Chuck Shavit

-- 
===============================================================
George Mills (mills@softronix.com)
http://www.softronix.com/
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home