This is a bug. The recursion point for $: is not being preserved over
the call to (". y), when y is longer than one word.
I can't fix it this instant but I will shortly.
Henry Rich
On 5/31/2020 9:15 AM, 'Pascal Jasmin' via Programming wrote:
wcint =: ( :: ($:@:".)) NB. with convert to int/num
2 +&(+: wcint) '8' NB. works 4+16
20
2 +&(+: wcint) '4+4' NB. wrong: 8+4
12
It appears as though if ". argument is a simple number then it "works", but if
an expression, then it doesn't.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm