diff options
| author | dgp <dgp@users.sourceforge.net> | 2019-06-10 18:53:29 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2019-06-10 18:53:29 (GMT) |
| commit | c6cb158e39e58c0780cadfe0d2565ae94e79767e (patch) | |
| tree | 5528a809d9f3019b23ee04154f9af5b06237387a | |
| parent | 95d4ef2aaecb4a90de398cacd37c1a2ccd1c4d45 (diff) | |
| parent | 39fba10b45e247bf94cdca222334c7cd4eb40087 (diff) | |
| download | tcl-c6cb158e39e58c0780cadfe0d2565ae94e79767e.zip tcl-c6cb158e39e58c0780cadfe0d2565ae94e79767e.tar.gz tcl-c6cb158e39e58c0780cadfe0d2565ae94e79767e.tar.bz2 | |
merge 8.6
| -rw-r--r-- | doc/expr.n | 10 | ||||
| -rw-r--r-- | generic/tclAssembly.c | 1 | ||||
| -rw-r--r-- | generic/tclInt.h | 18 |
3 files changed, 8 insertions, 21 deletions
@@ -97,7 +97,7 @@ and the value of \fBb\fR is 6. The command on the left side of each line produces the value on the right side. .PP .CS -.ta 6c +.ta 8c \fBexpr\fR 3.1 + $a \fI6.1\fR \fBexpr\fR 2 + "$a.$b" \fI5.6\fR \fBexpr\fR 4*[llength "6 2"] \fI8\fR @@ -190,16 +190,20 @@ Bit-wise OR. Valid for integer operands. \fB&&\fR . Logical AND. If both operands are true, the result is 1, or 0 otherwise. - +This operator evaluates lazily; it only evaluates its second operand if it +must in order to determine its result. .TP 20 \fB||\fR . Logical OR. If both operands are false, the result is 0, or 1 otherwise. +This operator evaluates lazily; it only evaluates its second operand if it +must in order to determine its result. .TP 20 -\fIx\fB?\fIy\fB:\fIz\fR +\fIx \fB?\fI y \fB:\fI z\fR . If-then-else, as in C. If \fIx\fR is false , the result is the value of \fIy\fR. Otherwise the result is the value of \fIz\fR. +This operator evaluates lazily; it evaluates only one of \fIy\fR or \fIz\fR. .PP The exponentiation operator promotes types in the same way that the multiply and divide operators do, and the result is is the same as the result of diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 47f7100..3615f33 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -517,6 +517,7 @@ static const unsigned char NonThrowingByteCodes[] = { INST_PUSH1, INST_PUSH4, INST_POP, INST_DUP, /* 1-4 */ INST_JUMP1, INST_JUMP4, /* 34-35 */ INST_END_CATCH, INST_PUSH_RESULT, INST_PUSH_RETURN_CODE, /* 70-72 */ + INST_STR_EQ, INST_STR_NEQ, INST_STR_CMP, INST_STR_LEN, /* 73-76 */ INST_LIST, /* 79 */ INST_OVER, /* 95 */ INST_PUSH_RETURN_OPTIONS, /* 108 */ diff --git a/generic/tclInt.h b/generic/tclInt.h index edf92c5..dbddb91 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4029,39 +4029,21 @@ MODULE_SCOPE int TclDivOpCmd(ClientData clientData, MODULE_SCOPE int TclCompileDivOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -MODULE_SCOPE int TclLessOpCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); MODULE_SCOPE int TclCompileLessOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -MODULE_SCOPE int TclLeqOpCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); MODULE_SCOPE int TclCompileLeqOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -MODULE_SCOPE int TclGreaterOpCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); MODULE_SCOPE int TclCompileGreaterOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -MODULE_SCOPE int TclGeqOpCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); MODULE_SCOPE int TclCompileGeqOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -MODULE_SCOPE int TclEqOpCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); MODULE_SCOPE int TclCompileEqOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -MODULE_SCOPE int TclStreqOpCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); MODULE_SCOPE int TclCompileStreqOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); |
