[Jprogramming] a domain error

Henry Rich HenryHRich at nc.rr.com
Thu Jan 3 22:57:17 HKT 2008


Your spacing indicated what you mean, but you must parenthesize
to match:

   incrTextNum=: ": @ >: @ _&".
   incrTextNum=: ": @ >: @ _&".
|domain error
|   incrTextNum=:    ":@>:@_&".
   incrTextNum=: ": @ >: @ (_&".)

 ": (>: (_&".))

Is not doing what you want.  It's a bunch of hooks so it comes out as

y ": (y >: (_&".) y)

Henry Rich

> -----Original Message-----
> From: programming-bounces at jsoftware.com 
> [mailto:programming-bounces at jsoftware.com] On Behalf Of Tracy Harms
> Sent: Thursday, January 03, 2008 9:27 AM
> To: programming at jsoftware.com
> Subject: [Jprogramming] a domain error
> 
> I do not understand why I receive the following domain
> errors. It would also be good to know why one occurs
> upon verb definition, while the other is not detected
> until execution.
> 
>    incrTextNum=: ": @ >: @ _&".
> |domain error
> |   incrTextNum=:    ":@>:@_&".
>    
>    incrTextNum=: ": (>: (_&".))
>    incrTextNum '34.5'
> |domain error: incrTextNum
> |       incrTextNum'34.5'
>    
>    ": >: _&". '34.5'
> 35.5
>    
> 
> Thank you, in advance, for the assistance.
> 
> 
> --
> Tracy B. Harms
> 
>      The advantages of executability and universality 
>      found in programming languages can be effectively 
>      combined, in a single coherent language, with the
>      advantages offered by mathematical notation.
> 				Kenneth E. Iverson
> 
> 
>       
> ______________________________________________________________
> ______________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
> 
> ----------------------------------------------------------------------
> For information about J forums see 
> http://www.jsoftware.com/forums.htm



More information about the Programming mailing list