tcl8.0.4 puts misbehaves in context of expr
Closed / Fixed218627ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:03:19
OriginalBugID: 1508 Bug Version: 8.0.4 SubmitDate: '1999-03-15' LastModified: '1999-08-07' Severity: SER Status: Released Submitter: pat ChangedBy: hobbs OS: All OSVersion: NA Machine: NA FixedDate: '1999-08-07' FixedInVersion: 8.0.5 ClosedDate: '2000-10-25' Newsgroups: comp.lang.tcl From: [email protected] (Robert R. Henry) Subject: tcl8.0.4 puts misbehaves in context of expr Date: Thu, 4 Mar 1999 22:43:23 GMT Xref: news3.best.com comp.lang.tcl:93456 When using tcl8.0.4, built in a vanilla fashion for either sunos or solaris, the following procedure executes in a manner I find pathological: proc x {} { puts "0x7" puts "0x3" expr 7 expr 0x3 return } The first puts outputs 3 characters (here indented for clarity): 0x7 the second puts outputs ONLY 1 character 3 If I comment out the line that evaluates the expr involving 0x3, then both puts output 3 characters, 0x7 and then 0x3. If I change the quotes from "" in the puts statements to {}, then I still get the SAME behaviour. {} are being volated! If I had to hazard a guess, the byte code compiler constructs a single internal normalized representation of the value 3 (or 0x3), which it then uses in both the puts and in the expr. needless to say this behaviour is quite unexpected, especially for the {} quoting case, and it is also different than tcl7.4 Robert R. Henry [email protected] This overaggressive compiler behavior was fixed in 8.0.5 and the 8.1+ versions. -- 08/07/1999 hobbs
welch Closed ticket [218627ffff].
[History diff]2000-10-26 08:26:08
dgp Ticket [218627ffff]: 3 changes
[History diff]2001-04-03 06:34:15
Log in (anonymous is fine) to add a comment.