Hi,

    The reason why Flow control doesn't suit explicit J is obviously because
batch processing languages were left to right and explicit J is right to
left. The simplest solution is to turn flow control into right to left
grammar.

signum=:
    ( else _1  if. y < 0
      else 0 if. y=0
      1)

signum=:
    ( 1 else 0 if. y=0 else _1  if. y < 0)

sumint=:
    (k=.0
     s=.0
         (s=.s+k while. k<: ]
          k=.k+1)
    s)

fac=:
    ( t =. ]
      else 1 if. t <: 1
      t * fac t – 1)

fact=:
    r =. 1
    t =. ]
        (r  =. r * t while. t > 1
         t =. t - 1)
    r)

        Don

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

Reply via email to