1# procshd7.tcl -- 2# 3# Test file for compilation. 4# This file contains a proc definintion, where the body is shared among 5# several procs. The args are different for same, the same for others 6# It checks that the compiler detects that the object is shared and creates a 7# copy that it will then compile. 8# Same as procsh5.tcl, with the addition that a variable shares the first 9# proc body. 10# 11# Copyright (c) 1998-2000 by Ajuba Solutions. 12# 13# See the file "license.terms" for information on usage and redistribution 14# of this file, and for a DISCLAIMER OF ALL WARRANTIES. 15# 16# RCS: @(#) $Id: procshd7.tcl,v 1.2 2000/05/30 22:19:13 wart Exp $ 17 18proc a { x } { 19 return "$x : $x" 20} 21 22proc b { x {y dummy} } { 23 return "$x : $x" 24} 25 26proc c { x y } { 27 return "$x : $x" 28} 29 30proc d { x {y dummy} } { 31 return "$x : $x" 32} 33 34proc e { x } { 35 return "$x > $x" 36} 37 38proc f { x } { 39 return "$x < $x" 40} 41 42set shv { 43 return "$x : $x" 44} 45 46list [a TEST] [b TEST] [c TEST dummy] [d TEST] [e TEST] [f TEST] 47