Thanks, that works.

The documentation could be clearer about the default case.

The documentation I am looking at is:
http://www.jsoftware.com/help/dictionary/csel.htm

I read the first example code (at the top if the page) and the
description below it - then stopped. Had I read on I would have come
across the example in middle of the next example code block.

It might be a good idea to change generic example at the top of the
page and to mention the default case in the description below it:

from:
select. T
 case.  T0 do. B0
 case.  T1 do. B1
 fcase. T2 do. B2
 case.  T3 do. B3
end.

to:
select. T
 case.  T0 do. B0
 case.  T1 do. B1
 fcase. T2 do. B2
 case.       do. B3
end.


Thanks,
Matthew.

2009/7/21 bill lam <[email protected]>:
> from ~help/dictionary/ctrl.htm
> An empty T block result or an omitted T block tests true.
>
> so that the followings are also true.
>
> if. do.
>
> elseif. do.
>
> while. do.
>
>
> On Mon, 20 Jul 2009, Alex Rufon wrote:
>> From the top of my head ...
>> select. T
>>  case.  T0 do. B0
>>  case.  T1 do. B1
>>  case.     do. B3
>> end.
>>
>> I really hope I got it right. :P
>>
>> -----Original Message-----
>> From: [email protected] 
>> [mailto:[email protected]] On Behalf Of Matthew Brand
>> Sent: Monday, July 20, 2009 4:15 PM
>> To: Programming forum
>> Subject: [Jprogramming] Default case for select.
>>
>> Is there a way to specify a default case in select?
>>
>>
>> i.e. I want: if. -. T0 *. T1 do. B3 end.
>>
>> I tried something like this, but it did not work:
>>
>> select. T
>>  case.  T0 do. B0
>>  case.  T1 do. B1
>> else.
>>  B3
>> end.
>>
>> Thanks,
>> Matthew.
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> ----------------------------------------------------------------------
> 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