I’ve been trying to explain that puts is in legacy and echo is the way to go I know Charlie is in Thailand but can anyone else set her straight on this?
The tcl puts command is part of the base Tcl installation.
puts ?-nonewline? ?channelId? string
Because puts allows for 3 arguments, the output string must be wrapped in double quotes or curly braces (grouped) when the output contains any white space.
Since echo only allows only one argument, the output string does not need to be wrapped in grouping characters such as double quotes or curly braces. Because of this, echo is often the preferred command for producing stdout (the screen or process log) output.
If indeed the echo command expected a single argument and that argument contained a space it would have to be quoted for the proc to see it as a single argument. However the echo proc is like:
proc echo args
The special proc variable “args” if passed as the last or only argument to a proc will result in everything to the end of the command (end of Line or 😉 being passed to th
Author
Replies
Viewing 1 reply thread
The forum ‘Cloverleaf’ is closed to new topics and replies.