I need to get my result (a number) into result_s as a string for
output purpose. Help appreciated:

#!jconsole

argx =: 3
argy =: 0 ". > 2 { ARGV

x =: [
y =: ]


ACK =: A1 `  (y + 1:)                    @. (x = 0:)
A1  =: A2 ` ((x - 1:) ACK 1:)            @. (y = 0:)
A2  =:       (x - 1:) ACK (x ACK y - 1:)

echo argx
echo argy

result =: argx ACK argy
result_s =: '' ". result

echo 'Ack(3,', argx, '):', result_s

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

Reply via email to