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

Reply via email to