Forum Discussion
Deb_Allen_18
May 22, 2005Historic F5 Account
use of {} as text delimiter
Here's a case where I've used {} as a delimiter. It seems to work, but I was wondering if it was legal usage of {}s and whether there was a better way:
HTTP::redirect "http://host.dom.com/sub/index.jsp?id=a0a0a&pid=${in_pid}&ptype=list"
The variable is followed directly by additional text with no natural delimiter, so I wanted to delimit the variable name, but double quotes around the variable would terminate the redirect string prematurely.
(Actually as it turns out, the character trailing the variable name is a &, which seems to delimit the name naturally. If an alpha-numeric follows the variable name, I get an undefined variable error. I can't find a documentation reference on that, so it seemed safest to delimit it somehow. I should at least know the proper way to do so.... =+)
thanks again for the great info
/deb
- unRuleY_95363Historic F5 AccountYes, Tcl allows the use of braces {} as a variable name delimiter. As a matter of fact, if your variable name contains any non-alphanumeric characters (other than an underscore), you will have to use braces around the variable name.
set my-really-cool-name "Pooh Bear" log "My name is: ${my-really-cool-name}"
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects