infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
PUTS vs ECHO
System
Originally posted by Brian Heather
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?
Find more posts tagged with
Clovertech
Comments
Max Drown
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.
Ex. puts "Hello, World!"
Reference page for puts:
http://www.tcl.tk/man/tcl8.5/TclCmd/puts.htm
The echo command is part of the TclX package.
echo ?str ...?
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.
Ex. echo Hello, World!
Reference page for echo:
http://www.tcl.tk/man/tclx8.2/TclX.n.html
Charlie Bursell
Good answer, but to expand a bit
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