I certainly see your point Linda,

The tests that I run my program through are an example of creating triggers to 
will reveal when my programming has created errors. If I was designing a 
language that could be used in as wide a variety of ways as J, I think that 
knowing when to generate meaningful error messages would be a very challenging 
task. I do think that in the case of 2002 3 1 that the value returned is 
meaningful, since that day exists. The one that I would question would be 2002 
2 29, which is not found on the calendar but still returns a value.

Cheers, bob

On Sep 24, 2014, at 3:42 PM, Linda Alvord <[email protected]> wrote:

> Using J often causes error message and they are very helpful.  They cause a
> reassessment of the statement in question. Most often it causes a quick fix
> as you notice the problem.  Since there is reasonalble response to todayno
> 2002 2 29
> I believe an error message would cause me to find the problem.
> 
> It seems incorrect to provide the value for 2002 3 1 is not helpful.  
> 
> This may just be a minority opinion.
> 
> Linda
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of robert
> therriault
> Sent: Wednesday, September 24, 2014 10:49 AM
> To: [email protected]
> Subject: Re: [Jprogramming] Weekend Puzzle - Age of Groundhog born 2002 2 2
> 
> Hi LInda,
> 
> Seems okay to me, since 
> 
>   (2001 3 1) diff 2001 2 28 NB. non leap year
> 1
>   (2000 3 1) diff 2000 2 28 NB. leap year
> 2
> 
>   diff=: 13 :'(todayno x)-todayno y'
>   (2005 3 1) diff 2004 2 28
> 367
>   (2004 3 1) diff 2003 2 28
> 367
>   NB. both these intervals contain 2004 2 29 because of a leap year
> 
>   (2003 3 1) diff 2002 2 28
> 366
>   (2002 3 1) diff 2001 2 28
> 366
> 
>   NB. these intervals don't contain a leap day
> 
> Cheers, bob
> 
> On Sep 24, 2014, at 2:06 AM, Linda Alvord <[email protected]> wrote:
> 
>> Does this seem ok to you?
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to