Improvement of error messages for Tcl frequently made mistak
Deleted218868ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:06:57
OriginalBugID: 2467 RFE
Version: 8.2
SubmitDate: '1999-07-28'
LastModified: '1999-12-03'
Severity: LOW
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: All
Machine: NA
FixedDate: '1999-12-03'
FixedInVersion: 8.3b1
ClosedDate: '2000-10-25'
Name:
Frederic BONNET
Comments:
Cameron Laird maintains a page with frequently made mistakes in Tcl at:
http://Starbase.NeoSoft.COM/~claird/comp.lang.tcl/fmm.html
This patch is related to the following FMMs:
http://Starbase.NeoSoft.COM/~claird/comp.lang.tcl/fmm.html#zero
http://Starbase.NeoSoft.COM/~claird/comp.lang.tcl/fmm.html#comments
DesiredBehavior:
The following patches add more explicit information when the two most
frequently made mistakes in Tcl are encountered: comments in switch and
bad octal values.
When Tcl encounters an error during a switch statement, it checks for
patterns beginning with #. This proves to be an efficient heuristic to
detect incorrectly placed comments in switch statements. It then append
the following string to the error message:
"this can be due to a comment incorrectly placed outside a switch body -
see the Tcl and switch man pages"
Everywhere Tcl expects an integer and detects an error, it will also
check if the string uses an invalid octal representation (ie an integer
with a leading zero) and append the following message:
"<integer> uses an incorrect octal representation - see the expr man
page"
Patch:
http://www.multimania.com/fbonnet/pub/fmm8.0.5.patch (for Tcl8.0.5)
http://www.multimania.com/fbonnet/pub/fmm8.1.1.patch (for Tcl8.1.1)
PatchFiles:
generic/tclCmdMZ.c
generic/tclGet.c
generic/tclObj.c
generic/tclExecute.c
generic/tclUtil.c
generic/tclInt.h
8.3 has improved error messages.
-- 12/03/1999 hobbs
welch Closed ticket [218868ffff].
[History diff]2000-10-26 08:30:15
dgp Open ticket [218868ffff].
[History diff]2001-04-19 03:00:46
dgp Ticket [218868ffff]: 2 changes
[History diff]2001-04-19 03:00:47
dgp Deleted ticket [218868ffff].
[History diff]2001-04-19 03:01:31
Log in (anonymous is fine) to add a comment.