Index: generic/tclCmdMZ.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCmdMZ.c,v
retrieving revision 1.64
diff -u -u -r1.64 tclCmdMZ.c
--- generic/tclCmdMZ.c	20 Mar 2002 22:47:36 -0000	1.64
+++ generic/tclCmdMZ.c	29 Mar 2002 19:30:50 -0000
@@ -2525,10 +2525,16 @@
 		p += parse.tokenPtr->size;
 		code = Tcl_EvalTokensStandard(interp, parse.tokenPtr,
 		        parse.numTokens);
-		if (code != TCL_OK) {
+		if (code == TCL_ERROR) {
 		    goto errorResult;
 		}
-		Tcl_AppendObjToObj(resultObj, Tcl_GetObjResult(interp));
+		if (code == TCL_BREAK) {
+		    Tcl_ResetResult(interp);
+		    return resultObj;
+		}
+		if (code != TCL_CONTINUE) {
+		    Tcl_AppendObjToObj(resultObj, Tcl_GetObjResult(interp));
+		}
 		Tcl_ResetResult(interp);
 		old = p;
 	    } else {
Index: tests/subst.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/subst.test,v
retrieving revision 1.10
diff -u -u -r1.10 subst.test
--- tests/subst.test	25 Feb 2002 23:17:21 -0000	1.10
+++ tests/subst.test	29 Mar 2002 19:30:51 -0000
@@ -150,6 +150,9 @@
 test subst-8.8 {return in a subst, parse error} {
     subst {foo [return {x} ; set bar baz ; set a {}" ; stuff] bar}
 } {foo xset bar baz ; set a {}" ; stuff] bar}
+test subst-8.9 {return in a variable subst} {
+    subst {foo $var([return {x}]) bar}
+} {foo x bar}
 
 test subst-9.1 {error in a subst} {
     list [catch {subst {[error foo; bogus code]bar}} msg] $msg
@@ -157,6 +160,9 @@
 test subst-9.2 {error in a subst} {
     list [catch {subst {[if 1 { error foo; bogus code}]bar}} msg] $msg
 } {1 foo}
+test subst-9.3 {error in a variable subst} {
+    list [catch {subst {foo $var([error foo]) bar}} msg] $msg
+} {1 foo}
 
 test subst-10.1 {break in a subst} {
     subst {foo [break; bogus code] bar}
@@ -173,6 +179,9 @@
 test subst-10.5 {break in a subst, parse error} {
     subst {foo [break ;set bar baz ;set a {}{} ; stuff] bar}
 } {foo }
+test subst-10.6 {break in a variable subst} {
+    subst {foo $var([break]) bar}
+} {foo }
 
 test subst-11.1 {continue in a subst} {
     subst {foo [continue; bogus code] bar}
@@ -189,6 +198,9 @@
 test subst-11.5 {continue in a subst, parse error} {
     subst {foo [continue ;set bar baz ;set a {}{} ; stuff] bar}
 } {foo set bar baz ;set a {}{} ; stuff] bar}
+test subst-11.6 {continue in a variable subst} {
+    subst {foo $var([continue]) bar}
+} {foo  bar}
 
 # cleanup
 ::tcltest::cleanupTests
