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." Stack Manipulation: "
2N/A " drop" 1 0 drop .passed?
2N/A " swap" 1 2 1 swap drop = .passed?
2N/A " nip" 1 0 1 nip - 0= .passed?
2N/A " over" 1 2 over 1 = nip nip .passed?
2N/A " dup" 1 dup = .passed?
2N/A " tuck" 2 1 tuck nip = .passed?
2N/A " rot" 3 2 1 rot 3 = nip nip .passed?
2N/A " -rot" 3 2 1 -rot 2 = nip nip .passed?
2N/A " 2rot" 1 2 3 4 5 6 2rot 2 = swap 1 = and swap 6 = and swap
2N/A 5 = and swap 4 = and swap 3 = and .passed?
2N/A " 2dup" 1 -1 2dup + 0= nip nip .passed?
2N/A " ?dup" 0 1 ?dup = nip .passed?
2N/A " 2swap" 1 1 0 0 2swap and nip nip .passed?
2N/A " 2drop" 1 1 0 0 2drop and .passed?
2N/A " 2over" 1 2 0 0 2over 2swap 2drop rot = -rot = = .passed?
2N/A " roll" 1 2 3 4 3 roll 1 = nip nip nip .passed?
2N/A " depth" 0 0 depth 4 = nip nip .passed?
2N/Acr
2N/A
2N/A." Return Stack: "
2N/A: test-rs
2N/A " >r" 3 1 >r 2 >r 3 = .passed?
2N/A " r@" 3 r@ 2 = nip .passed?
2N/A " r>" 3 r> 2 = r> 1 = and nip .passed?
2N/A; test-rs
2N/A: bail-test ( -- ) r> drop ;
2N/A: bail ( -- ) 1 bail-test drop 0 ;
2N/A " Manipulate" bail .passed?
2N/Acr