Hi, i am attempting to write a simple script to sum two given numbers:
#A simple script that sum two given numbers
proc Sum {number1 number2} {
return [expr $number1+$number2];
}
proc main {} {
puts "Sum between two numbers";
puts "";
puts -nonewline "Insert the numbers:"
flush stdout;
?
#sum given numbers
puts "The sum is: [Sum $number1 $number2]";
}
#call main
main;
What might i write in the place of question mark?
And, if i insert a string or a char in the place of numbers, what happens?
Thanks!
#A simple script that sum two given numbers
proc Sum {number1 number2} {
return [expr $number1+$number2];
}
proc main {} {
puts "Sum between two numbers";
puts "";
puts -nonewline "Insert the numbers:"
flush stdout;
?
#sum given numbers
puts "The sum is: [Sum $number1 $number2]";
}
#call main
main;
What might i write in the place of question mark?
And, if i insert a string or a char in the place of numbers, what happens?
Thanks!