2N/A\ #ident "%Z%%M% %I% %E% SMI"
2N/A\ purpose:
2N/A\ copyright: Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2N/A\ copyright: Use is subject to license terms.
2N/A\ copyright:
2N/A\ copyright: CDDL HEADER START
2N/A\ copyright:
2N/A\ copyright: The contents of this file are subject to the terms of the
2N/A\ copyright: Common Development and Distribution License, Version 1.0 only
2N/A\ copyright: (the "License"). You may not use this file except in compliance
2N/A\ copyright: with the License.
2N/A\ copyright:
2N/A\ copyright: You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A\ copyright: or http://www.opensolaris.org/os/licensing.
2N/A\ copyright: See the License for the specific language governing permissions
2N/A\ copyright: and limitations under the License.
2N/A\ copyright:
2N/A\ copyright: When distributing Covered Code, include this CDDL HEADER in each
2N/A\ copyright: file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A\ copyright: If applicable, add the following below this CDDL HEADER, with the
2N/A\ copyright: fields enclosed by brackets "[]" replaced with your own identifying
2N/A\ copyright: information: Portions Copyright [yyyy] [name of copyright owner]
2N/A\ copyright:
2N/A\ copyright: CDDL HEADER END
2N/A\ copyright:
2N/A
2N/A." Case: "
2N/A: case1 ( n -- str )
2N/A case
2N/A 0 of " zero" >r >r endof
2N/A 1 of " one" >r >r endof
2N/A 2 of " two" >r >r endof
2N/A dup <# u#s u#> >r >r
2N/A endcase
2N/A r> r>
2N/A;
2N/A " case.1" 0 case1 drop " zero" comp invert .passed?
2N/A " case.2" 1 case1 drop " one" comp invert .passed?
2N/A " case.3" 2 case1 drop " two" comp invert .passed?
2N/A " case.4" 3 case1 drop " 3" comp invert .passed?
2N/A " case.5" 4 case1 drop " 4" comp invert .passed?
2N/Acr