\ #ident "%Z%%M% %I% %E% SMI"
\ purpose:
\ copyright: Copyright 2005 Sun Microsystems, Inc. All rights reserved.
\ copyright: Use is subject to license terms.
\ copyright:
\ copyright: CDDL HEADER START
\ copyright:
\ copyright: The contents of this file are subject to the terms of the
\ copyright: Common Development and Distribution License, Version 1.0 only
\ copyright: (the "License"). You may not use this file except in compliance
\ copyright: with the License.
\ copyright:
\ copyright: You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
\ copyright: or http://www.opensolaris.org/os/licensing.
\ copyright: See the License for the specific language governing permissions
\ copyright: and limitations under the License.
\ copyright:
\ copyright: When distributing Covered Code, include this CDDL HEADER in each
\ copyright: file and include the License file at usr/src/OPENSOLARIS.LICENSE.
\ copyright: If applicable, add the following below this CDDL HEADER, with the
\ copyright: fields enclosed by brackets "[]" replaced with your own identifying
\ copyright: information: Portions Copyright [yyyy] [name of copyright owner]
\ copyright:
\ copyright: CDDL HEADER END
\ copyright:
." catch/throw: "
: ttest ( n -- ) throw 0 ;
: ttest1 ( -- ) 0 ['] ttest catch 0= swap 0= and ;
: ttest2 ( -- ) 1 1 ['] ttest catch nip 1 = swap 1 = and ;
" 0 throw" ttest1 .passed?
" 1 throw" ttest2 .passed?
cr