As you can see from

   (((7*[) (+[)&....@] 3&{...@]))
+-------+-------------------+--------------+
|+-+-+-+|+-------------+-+-+|+--------+-+-+|
||7|*|[|||+-----+--+--+|@|]|||+-+-+--+|@|]||
|+-+-+-+|||+-+-+|&.|dn|| | ||||3|&|{.|| | ||
|       ||||+|[||  |  || | |||+-+-+--+| | ||
|       |||+-+-+|  |  || | ||+--------+-+-+|
|       ||+-----+--+--+| | ||              |
|       |+-------------+-+-+|              |
+-------+-------------------+--------------+

the central verb Works on the RHS only. 

Perhaps this is what you want?

    5( ((7 tod...@*[) (+[)&.dn 3&{...@]) , 3&}...@])now
2009 4 13 11 14 34


R.E. Boss


-----Oorspronkelijk bericht-----
Van: [email protected]
[mailto:[email protected]] Namens Tracy Harms
Verzonden: maandag 9 maart 2009 19:48
Aan: Programming forum
Onderwerp: [Jprogramming] Under

I'm having difficulty using Under where it seems that it should be
natural to do so. I vaguely recall this difficulty being discussed
here before, but I don't recall the answer.

   load 'dates'

   ]now=: <.6!:0''
2009 3 9 11 14 34

NB. I can accomplish the desired program as shown below.
   wf=:  ([: todate (7*[) + todayno@(3&{...@])) , 3&}...@]
   5 wf now
2009 4 13 11 14 34

   NB. What I can't do is rely on this relationship
   dn =: todayno :. todate

   NB. to rely on Under along these lines:
   weeksfrom=:  ((7*[) (+[)&....@] 3&{...@]) , 3&}...@]

NB. However, the left parameter (result of (7*[)) is obscured by the
use of &. (i.e. inaccessible when the addition is to occur)

Can Under be used in a circumstance like this?

Tracy
----------------------------------------------------------------------
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