Hi all, i have a simple question, please read the following code:
My question is simple, i want simply to press 'a' or 'b' without press return and then i want to see my name or my surname printed on the screen. What might i write on the place of question mark?
Thanks!
Code:
#A simple script that print my name or my surname
proc main {} {
set choice;
puts "What do you want to see printed on the screen?";
puts "";
puts "a: Pasquale";
puts "b: Frega";
puts "";
?
if {$choice=="a"} {
puts "Pasquale";
} elif {$choice=="b"} {
puts "Frega";
}
}
main;
Thanks!