Raul D Miller wrote:
> 99 ;@(".&.> ;:) '123 123x bad_number'
> 123 123 99
99 ;@(".&.> ;:) '123 123x #VALUE!' NB. I love Excel
123 123 99 99 99
Yes, of course, I can improve the solution. That's my job as a programmer.
But if I have to handle all these details, what's the point of using a
high level language like J? I might as well start with:
(#&10@:# #. '0123456789'&i.) '123'
123
and build up from there. Or, better yet, forget about #. and i. and
use an explicit loop over the characters in y. and a select statement to
determine the value of the digit. Wait; forget the loop. I should use a
goto. ...
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm