Kip Murray wrote:
> 
> How do you check arguments for a tacit verb?  Say it's monadic"0 and I
> want the argument to be 
> real and positive excluding _ (infinity).  If no, halt with an error
> message; if yes, process 
> the argument, say take the natural logarithm.  /Kip Murray
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
Assert=:[:`...@.
   (<&_ * >&0) Assert
[:`...@.(<&_ * >&0)
   (<&_ * >&0) Assert"0 (1 2 3 4)
1 2 3 4
   (<&_ * >&0) Assert"0 (1 2 3 4 0)
|domain error
|       (<&_*>&0)Assert"0(1 2 3 4 0)
   ^. (<&_ * >&0) Assert"0 (1 2 3 4)
0 0.693147 1.09861 1.38629

-- 
View this message in context: 
http://www.nabble.com/Order-of-embedded-numeric-modifiers-tp23362005s24193p23720614.html
Sent from the J Programming mailing list archive at Nabble.com.

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

Reply via email to