A few useful shortcuts:

isBoxed=: 0 < L.
isChar=: {.@, e. a."_
isInt=: = <.
isReal=: = +

Louis

> On 2 Apr 2017, at 14:43, 'Pascal Jasmin' via Programming 
> <[email protected]> wrote:
> 
> datatype or 3!:0
> 
> 
> datatype 3 4.1 0
> 
> 
> 
> 
> ________________________________
> From: Herbert Weissenbaeck // Privat <[email protected]>
> To: [email protected] 
> Sent: Sunday, April 2, 2017 8:33 AM
> Subject: [Jprogramming] type/domain of an argument
> 
> 
> 
> quick beginner's question:
> 
> how can i test whether an x or y argument is an array of int or an array of 
> float or an array of char or of any other type (to avoid domain errors and 
> handle different types differently in functions)?
> 
> thank you
> 
> herbert
> 
> 
> ----------------------------------------------------------------------
> 
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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