| Ticket UUID: | 1801314 | ||
| Title: | Numeric Comparisons 101 - if: Error in example code | ||
| Type: | Bug | Created on: | 2007-09-24 16:41:34 |
| Submitter: | nobody | Assigned to: | davidw |
| Subsystem: | 75. Tutorial | Severity: | |
| Priority: | 5 Medium | Last modified: | 2007-09-24 23:42:52 |
| Status: | Open | Closed by: | |
| Resolution: | None | Closed on: | |
| Version: | None | ||
| Description: | ||||
#
# A dangerous example: due to the extra round of substitution,
# the script stops
#
set y {[exit]}
if "$$y != 1" {
puts "$$y is != 1"
} else {
puts "$$y is 1"
}
| ||||
| User Comments: | ||||
[email protected] added on 2007-09-24 23:42:52:
Logged In: NO
I believe the dangerous line should read:
if "$y != 1" {
To cause the evaluation of exit after substitution.
| ||||
