On Sun, May 9, 2010 at 10:27 AM, Ian Gorse <[email protected]> wrote: >> In addition to Don Guinn's point, you might consider: >> 64*0&<: i:10 > > I wasn't actually looking for a solution such as that, I purely was > trying it via a gerund as I have now started to learn this area of J. > > if x >= 0 then 64 else 0 > > was just an example to teach myself a simple case statement in J
That is reasonable. Nevertheless, I find myself using arithmetic in many cases where I would be inclined to use a case or an if statement in other languages. It is even possible that I find more uses to the "multiply the result of a boolean operation" approach more frequently than gerunds and explicit conditions, combined. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
