Tcl Source Code

View Ticket
Login
Ticket UUID: 1482667
Title: More detailed information on [if ... else] and spaces
Type: Bug Created on: 2006-05-05 18:04:15
Submitter: zoro2 Assigned to: davidw
Subsystem: 75. Tutorial Severity:
Priority: 5 Medium Last modified: 2006-05-05 18:04:15
Status: Open Closed by:
Resolution: None Closed on:
Version: None
Description:
Lately I've been working with people that need to learn 
Tcl to maintain legacy apps. One of the most common 
mistakes they do is something like this:

if {$a == $b} {
    puts "A==B"
}else{
    puts "A!=B"
}

Since if...else are keywords for most languages, people 
learning Tcl tend to make such mistakes.

Another one is that people tend not to understand that 
{ after the condition/else needs to be in the same 
line. It would be useful to mention this as well.

I guess this should go into Tcl4.html and Tcl7.html 
should reference and revise this.

I would assume this would really help non-Tcl 
background people to understand these things better.