throw. causes execution to resume in the catcht.
section of an explicit definition that invoked the current code,
returning to immediate execution if there is no such catcht. .
main=: 3 : 0
case. 'aaaa' do. 'throw aaaa'
case. 'bbb' do. 'throw bbb'
case. 'cc' do. 'throw cc'
case. do. throw. NB. handled by a higher-level catcht. (if any)
sub=: 3 : 0
if. y<0 do. type_jthrow_=: 'aaaa' throw. end.
if. y<4 do. type_jthrow_=: 'bbb' throw. end.
if. y<8 do. type_jthrow_=: 'cc' throw. end.
(":y),' not thrown'
88 not thrown
A throw. can communicate information back to
a catcht. through the use of a global name in a locale,
as illustrated in the examples above.