There are standard functions such as atof and atoi in C\'s stdlib.h for converting strings to floats / integers (and to do the reverse
Everything is a string in Tcl, but functions that expect a number (like expr) will use that 'string' as an integer:
% set str " 123 "
123
% set num [expr $str*2]
246
If you want to format a number in a specific way (like producing a floating a point number of a specific precision) then you can use format:
% set str " 1.234 "
1.234
% set fnum [format "%.2f" $str]
1.23