Ticket UUID: | 426038 | |||
Title: | variable has to have at least one arg | |||
Type: | Patch | Version: | None | |
Submitter: | davidw | Created on: | 2001-05-21 20:13:15 | |
Subsystem: | 07. Variables | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2001-07-04 07:51:52 | |
Resolution: | Fixed | Closed By: | hobbs | |
Closed on: | 2001-07-04 00:51:52 | |||
Description: |
@ashland [~] $ tclsh tclsh8.3 [~]variable tclsh8.3 [~] It should produce an error: % variable wrong # args: should be "variable ?name value...? name ?value?" | |||
User Comments: |
hobbs added on 2001-07-04 07:51:52:
Logged In: YES user_id=72656 Doh, David and Don are correct. I was led astray by seeing the first arg as a '?', not noting the later required 'name' (weird). I've added the patch to 8.4a3 with tests (nothing was expecting the no args in the test suite). dgp added on 2001-07-04 07:37:19: Logged In: YES user_id=80530 I disagree, Jeff. Looking carefully at the SYNOPSIS of the [variable] man page: variable ?name value...? name ?value? it is indicated that [variable] needs at least one "name" argument. [variable] is acting contrary to that documentation, so there *is* a bug. My opinion: anyone counting on no arguments to [variable] working is relying on undocumented behavior and deserves whatever incompatibility they suffer. But, I'd accept an update to the docs to match the behavior as well. hobbs added on 2001-07-04 04:09:51: Logged In: YES user_id=72656 Strictly speaking, the command is defined to accept no arguments and do nothing. I don't know what the value of that is, but changing it might effect someone that was doing something silly like: eval variable $args davidw added on 2001-05-22 03:13:16: File Added - 6517: /home/davidw/tcl.diff |
Attachments:
- tcl.diff [download] added by davidw on 2001-05-22 03:13:16. [details]