# attenzione : se non si antepone } ad else nella stessa riga, da errore ! frame .f text .f.text pack .f.text pack .f set colore "rosso" if {$colore == "giallo"} { .f.text insert end "il colore e' giallo" } elseif {$colore == "blu"} { .f.text insert end "il colore e' blu" } elseif {$colore == "rosso"} { .f.text insert end "il colore e' rosso" }

if_elseif.tcl