'verb fill' is a term I invented, to contrast it with what I
call 'framing fill'.

'Framing fill' is added when the results of cells are of
dissimilar shape and they have to be padded so that they
can form an array.  Example:

   i."0 (1 2 3)
0 0 0
0 1 0
0 1 2

the results of the 3 applications of i. are (,0) , (0 1), and
(0 1 2)  According to the rules of J, all cells must have the
same shpe, so the extra 0s are added as part of assembly into a final
array.  The verb doesn't add those 0s, and there is nothing you can
do to make the value anything other than 0.

In contrast,
   5 {. 0 1
0 1 0 0 0

here the fills were added by the verb.  Many verbs allow you
to change the fill atom using !. .  {. is one of them, so
   5 {.!.9 (0 1)
0 1 9 9 9

  I call these fills that are added by the verb 'verb fills'.
If you can come up with a better name, I'll use it.

  Another example:
   1 2 ,!.99 i. 2 3
1 2 99
0 1  2
3 4  5

  But:
   (;!.99) 1 2 ; i. 2 3
|domain error

Roger: shouldn't !. be supported here?

Henry Rich


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of metaperl.j
> Sent: Saturday, November 10, 2007 9:35 AM
> To: [email protected]
> Subject: [Jgeneral] J for C Programmers - verb fill or noun fill?
> 
> 
> What is a verb fill? I guess a verb fill is a fill of a noun 
> appropriate to
> the verb being executed?
> 
> Re: http://www.jsoftware.com/help/jforc/more_verbs_for_boxes.htm
>  It appears that the *noun* 1 2 was filled...
> 
>    ; 1 2 ; i. 2 3
> 
> 1 2 0
> 0 1 2
> 3 4 5
> 
> 
> Here the second box contains a rank-2 array, while the first 
> box contains a
> rank-1 array.  The items of highest rank have rank 1, which means that
> rank-1 items are going to be lined up as the items of a 
> rank-2 result.  Any
> contents of lower rank are brought up to the rank of the highest-rank
> contents, by adding single-length leading axes; after that 
> operation, the
> items of all the modified contents have the same rank (but 
> not necessarily
> the same shape).  If the shapes of any of those items differ, 
> verb fills are
> added to bring each axis up to the length of the longest 
> axis; then the
> items are assembled into a list whose rank is 1 higher than 
> the rank of an
> item.  In this example the concatenated items have rank 1, 
> and verb fill was
> added to bring the single item of the first box up to a length of 3.
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/J-for-C-Programmers---verb-fill-or-noun-
> fill--tf4782696s24193.html#a13682473
> Sent from the J General mailing list archive at Nabble.com.
> 
> ----------------------------------------------------------------------
> 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