Another $put/$get failure?


#1

Could someone please check this Export script for me?

$loop(%track%)%track% >> $if($eql(1,%track%),did PUT: $put(aa,%track%),did get: $get(aa))
$loopend()

On three files tagged track 1, 2, 3, I get

1 >> did PUT: 1 (expecting 1)
2 >> did get: 2 (expecting 1)
3 >> did get: 3 (expecting 1)

Oops.

I wonder if this due to the previously reported $put/$get being more widely effective than believed. In which case... has anyone here actually got $put/$get to work at all?


#2

So far as I am able to remember, you cannot use PUT in the parameterlist of an IF construct.
You have to code something like $put(answer,$if($eql(1,%track%),yes,no)).

DD.20071118.1930.CET


#3

So far as I am able to remember, you cannot use PUT in the parameterlist of an IF construct.

Aha, thanks. Mods, it would be good if there was a list of such issues.

You have to code something like $put(answer,$if($eql(1,%track%),yes,no)).

OK, so to not change the variable, I must use $put(answer, ... $get(answer)). Giving the following workaround for my case:

$put(aa,$if($eql(1,%track%),%track%,$get(aa)))

Thank works! Thanks, Detlev.