Hi, - there's a built in way to solve your problem.
You should use the "entry" command with option "-show"; the following char ( strictly the first char of the following string ) is the displayed character, e.g.
entry .widgetname ..... -show "*"
That applies also for doing copy-and-paste, you...
Strings with a leading zero are classified by TCL as an octal number. And then "08.." or "09.." are impossible values.
Your solution with "string is digit" is ok., but there's a comment in the string manuel page:
"string is digit --> Any unicode digit character. Note that this includes...
If you would to solve your problem with a single regular expression try:
regexp {^(.*?)&&} $bw dummy match
Easier to understand is the following two-line-version:
regexp -indices {&&} $bw indx
set match [ string range $bw 0 [ expr [ lindex $indx 0 ] - 1 ] ]
good luck !
Try it with:
regsub {<table.+<table.+/table>.+/table>} $yourstring {<pre>&</pre>} yourstring
with "$yourstring" standing for one complete line as described above
It's a nice idea to use the "string map"-command, but, sorry, I think it's not the solution for the original problem.
The purpose is, to find a pattern "blue" an then to replace another string "aaaa" (not the pattern) at the same line with a subsitution value...
There was a little omission in the third line - sorry !
Here again the complete code:
#-----------------------------------------------------------
set pattern "AAA"
set table ""
set inp [ open $substitutionfile r ]
while { [ gets $inp line ] >= 0 } { lappend table $line }...
I tried this to solve your problem:
( You'd only to assign the values of "aaaa" "bbbb" to the lines of your substitution table ( second file or third column in your substitution file ?? ))
1. Reading your substitution file to a list:
set ytable ""
set inp [ open...
Thanks for your responses!
Here the answers of your questions:
to "Bong":
It's only the TCL-Subshell that crashes; the OS is free.
to "Bob Rashkin":
The construct
{set [ channel [ open "| ***.exe" "parameters" ] ... and so on}
I use usually ( so I can...
I use TCL/TK 8.3.2 under WINNT 4.0.
For generating filed based checksums I'd to absolve a loop containing an "exec"-command.
When then number of files reaches the limit of some thousand files the script breakes and the TCL-parser is frozen.
To reach that point it's irrelevant, what...
I'm using the following method within a procedure-call far all kinds of executables (*.exe,*.bat,...)
The filename of the executable ( inclusive parameters as a quoted string ) has to assign to "var(fil)"
Results are:
1.) The error-counter $var(flt) (zero means all right)
2.) All the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.