Re: WHILE and IF
- From: mghembru@xxxxxxxxxxxxxxxxxxxxxxx (MH)
- Date: Mon, 16 Jan 2006 20:16:14 +0000 (UTC)
In article <1137277182.227538.314190@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
suchenwi <richard.suchenwirth-bauersachs@xxxxxxxxxxx> wrote:
>> if ([string compare $line $header] == 0) continue
>Won't work. Parens in Tcl are not special, except for array indexing.
>The condition for [if] is typically put in braces:
> if {[string compare $line $header] == 0} continue
>But using [string compare] is a bit old-fashioned too, nowadays we'd
>just use the "eq" operator and write
> if {$line eq $header} continue
Hmm..
When did eq get added, and is there some documentation that explains the
differences (I assume there are some) between:
if { $line eq $header }
and
if { $line == $header }
?
Thanks,
Mattias
.
- Follow-Ups:
- Re: WHILE and IF
- From: Gerald W. Lester
- Re: WHILE and IF
- From: Bryan Oakley
- Re: WHILE and IF
- References:
- WHILE and IF
- From: delphinuscadmus@xxxxxxxxx
- Re: WHILE and IF
- From: Ted Nolan <tednolan>
- Re: WHILE and IF
- From: delphinuscadmus@xxxxxxxxx
- Re: WHILE and IF
- From: suchenwi
- WHILE and IF
- Prev by Date: Re: splitting string
- Next by Date: Re: splitting string
- Previous by thread: Re: WHILE and IF
- Next by thread: Re: WHILE and IF
- Index(es):
Relevant Pages
|