Re: And another crm114 script language question about 'isolate'
Paolo <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <20080331051054.GM25908@localhost> |
On Mon, Mar 31, 2008 at 03:08:35AM +0100, Ger Hobbelt wrote:
> ... Hi, it's me again.
>
> CRM114 language appreciation is the thing.
>
> Quick check, because I blew my rotoplooker while having it suck on this one:
>
>
> Scenario:
>
> run crm114 with a few --var arguments on the command line.
>
> 'Normally', I'd use a line like this to grab 'em each:
>
> isolate <default> (:var:) //
>
> to make sure the :var: is always there for the remainder of the code,
> even when the commandline abuser didn't specify it.
>
>
> Q: are these incantations _intended_ to be exactly the same?
>
> isolate (:var:)
>
> (Note the lack of /.../ there)
>
> and
>
> isolate <default> (:var:) //
the 1st (re)defines / moves :var: into the isolation buffer, the latter does
the same and assign it a value IFF it's not already defined. Then
isolate (:var:) //
does the same, regardless of previous existance of :var:.
So we have:
$ crm -{isolate (:var:)
isolate (:var1:) //
isolate <default> (:var2:) //
output /var=:*:var:= var1=:*:var1:= var2=:*:var2:= var3=:*:var3:= \n/
} --var=1 --var1=2 --var2=3
var=1= var1== var2=3= var3=:var3:=
$ crm -{isolate (:var:)
isolate (:var1:) //
isolate <default> (:var2:) //
output /var=:*:var:= var1=:*:var1:= var2=:*:var2:= var3=:*:var3:= \n/
} --var=1 --var1=2 --var2=3 --var3=4
var=1= var1== var2=3= var3=4=
which looks right to me.
Of course <default> should work for successive ISOLATE as well:
$ crm -{isolate (:var:)
isolate (:var1:) //
isolate <default> (:var2:) //
isolate (:v:)
isolate (:d:)
isolate (:v:) /x/
isolate <default> (:d:) /x/
output /var=:*:var:= var1=:*:var1:= var2=:*:var2:= var3=:*:var3:= /
output /v=:*:v:= d=:*:d:=\n/
} --var=1 --var1=2 --var2=3 --var3=4
var=1= var1== var2=3= var3=4= v=x= d==
note that :d: is not touched by last ISOLATE, which again looks right to me.
--
paolo
GPG/PGP id:0x3A47DE45 - B5F9 AAA0 44BD 2B63 81E0 971F C6C0 0B87 3A47 DE45
- 9/11: the outrageous deception and ongoing coverup: http://911review.org -
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace