ci =. 'abc';'13.2'
   (datatype L:0) 0 1 (0&".@])^:[ L:0"0  ci
-------+--------+
literal|floating|
-------+--------+

Henry Rich

On 2/21/2023 11:08 PM, Gilles Kirouac wrote:
I have two character strings :

   datatype each 'abc';'13.2'
┌───────┬───────┐
│literal│literal│
└───────┴───────┘

I want to convert the second one into numerical data

  datatype each (<@:])`(<@:".)"1 >'abc';'13.2'
┌───────┬────────┐
│literal│floating│
└───────┴────────┘

Can you simplify the above expression?


~ Gilles
----------------------------------------------------------------------
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