I am trying to write a TCL proc and pass a list of args to the proc when it is called, I am not doing something correctly. I have attached my code example and the error I recieve. Any ideas? Thanks in advance.
How I am calling it:
xlt_parse_field "DELIM - MSG 0 STRNUM 0"
Code:
proc xlt_parse_field { args } {
keylget args ARGS.DELIM inDelim
keylget args ARGS.MSG inMSG
keylget args ARGS.STRNUM inStrNum
echo "Delim: $inDelim"
echo "MSG: $inMsg"
echo "StrNum: $inStrNum"
}
Error:
errorInfo:
no value given for parameter "DELIM" to "xlt_parse_field"
while executing
"xlt_parse_field "DELIM - MSG 0 STRNUM 0""
<End of errorInfo>
How I am calling it:
xlt_parse_field "DELIM - MSG 0 STRNUM 0"
Code:
proc xlt_parse_field { args } {
keylget args ARGS.DELIM inDelim
keylget args ARGS.MSG inMSG
keylget args ARGS.STRNUM inStrNum
echo "Delim: $inDelim"
echo "MSG: $inMsg"
echo "StrNum: $inStrNum"
}
Error:
errorInfo:
no value given for parameter "DELIM" to "xlt_parse_field"
while executing
"xlt_parse_field "DELIM - MSG 0 STRNUM 0""
<End of errorInfo>