It's a little complicated because the parsing of j treats undefined
characters as sort of unknowns until the data values for the expression are
used. When b is first mentioned j doesn't know if it is a noun or verb or
... .
The foreign 4!: can be used to determined the type of a defined term as
shown in the verb 'type' as below.

In my examples below a and b have NOT been defined.

   sum =. +/
   type <'sum'
┌────┐
│verb│
└────┘
   ques =. a . b
   type <'ques'
┌────┐
│verb│
└────┘
   type
{&(<;._1 '|invalid name|not
defined|noun|adverb|conjunction|verb|unknown')@(2&+)@(4!:0)&boxopen
   ques =.  . b
   type <'ques'
┌──────┐
│adverb│
└──────┘


On Mon, Aug 13, 2018 at 1:08 PM, More Rice <[email protected]> wrote:

> Thank you, Jose.  That's exactly what puzzles me.  I didn't define b.  I
> was expected some error from J.
>
> If b isn't defined, how can J determine what part of speech b is in to
> execute the sentence? (I thought how verbs got executed depends on it.)
>
> thanks.
>
> b
>
> |value error: b
>
>
-- 
(B=) <-----my sig
Brian Schott
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to