For Programmers: Free Programming Magazines  


Home > Archive > Tcl > July 2005 > Re: Invalid command name ""









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Invalid command name ""
slebetman@yahoo.com

2005-07-29, 10:01 pm

All above explanations are correct. To understand this, try the
following:

proc testproc {} {
return "This is a test"
}

proc squareproc {} {
return "testproc"
}

[ squareproc ]

The function squareproc in my example just return the string testproc.
Note that it is just a string and squareproc does nothing special.
The interpreter will execute the first word of a line. Since squareproc
returns the word testproc then testproc becomes the first word on the
line.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com