fcase is used occasionally in base library and addons.
eg.

select. Show >. {. y,0
fcase. 5 do.
  initmisc''
  inithier''
  initflip''
  initzoom''
  initrange''
  initcube''
fcase. 4 do.
  if. GridVirtualMode > Hier do.
    getdata'' return.
  end.
fcase. 3 do.
  initxywh ''
  initaxes''
  initdata''
  initcell''
  initheader''
  initextents''
fcase. 2 do.
  getfmt ''
  getextent''
fcase. 1 do.
  initsizes''
end.

5 executes all blocks while 1 executes only the last block.

your purposed pcase works if switch labels are duplicated which
is rare if not illegal.

Чт, 02 мар 2017, jprogramming написал(а):
> Do not see the usefulness of the fcase. option.  see example here:  
> http://www.jsoftware.com/help/dictionary/csel.htm
> 
> 
> I would see a "passthrough case" pcase. usefulness
> 
> f2=: 3 : 0
> t=. ''
> select. y
> case.  1 do. t=.t,'one '
> pcase. 2 do. t=.t,'two '
> case.  2;3 do. t=.t,'three '
> case. 2;3;4 do. t=.t,'four '
> end.
> )
> 
> f2 2
> two three 
> 
> a pcase. statement would not abort search after a match.
> ----------------------------------------------------------------------
> 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
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to