Re: Disabling bracket substitution?
- From: "slebetman@xxxxxxxxx" <slebetman@xxxxxxxxx>
- Date: 29 Jan 2007 15:00:00 -0800
On Jan 29, 10:47 pm, Glenn Jackman <gle...@xxxxxx> wrote:
At 2007-01-29 09:28AM, "howard.c" wrote:
A sample of the log file looks like this:
1/22/2007 12:00:27 AM Received SECS message 'S5F1' on Resource
'AMAT_DPS' ; Alarm report send
< L,3
< Binary ALCD = 05 >
< U4 ALID = 398983177 >
< ASCII ALTX = Move Failed for Wafer PodC 10 from llb[1 >
When I read this line into my code with:Try:
puts -nonewline $writechan [lrange $line 4 end-1]\tDon't perform list operation on strings (and vice versa).
puts -nonewline $writechan [lrange [split $line] 4 end-1]\t
Actually, for what he's attempting to do, it's probably better to:
puts -nonewline [string trim [lindex [split $line =] 1]]
1. It's safer for variable whitespace.
2. It's intent is clearer (the right hand side of "=").
.
- References:
- Disabling bracket substitution?
- From: howard.c
- Re: Disabling bracket substitution?
- From: Glenn Jackman
- Disabling bracket substitution?
- Prev by Date: Re: TCL and SQLite
- Next by Date: Trouble understanding TCL code
- Previous by thread: Re: Disabling bracket substitution?
- Next by thread: Re: Disabling bracket substitution?
- Index(es):
Relevant Pages
|