Trying to figure out skipif Why does this yield NO RECORDS
{SKIPIF { COMPARE "1" = "2" } }
When without it I have 50 records?
Peter Jamieson - 09 Aug 2004 19:49 GMT
It's because SKIPIF needs the following syntax
{ SKIPIF expression1 comparison-operator expression2 }
so e.g.
{ SKIPIF "1" = "2" }
or
{ SKIPIF { COMPARE "1" = "2" } = 1 }
should yield all the records,
{ SKIPIF "1" = "1" }
or
{ SKIPIF { COMPARE "1" = "1" } = 1 }
should yield no records.
As far as I know you cannot replace
expression1 comparison-operator expression2
by a scalar value of any type and have SKIPIF do anything except SKIP
everything, e.g.
{ SKIPIF 1 }
{ SKIPIF 0 }
{ SKIPIF -1 }
{ SKIPIF "A" }
will all yield no records, and by doing
{SKIPIF { COMPARE "1" = "2" } }
you are in effect doing
{ SKIPIF 0 }

Signature
Peter Jamieson
> Trying to figure out skipif Why does this yield NO RECORDS
>
> {SKIPIF { COMPARE "1" = "2" } }
>
> When without it I have 50 records?
grep - 09 Aug 2004 21:30 GMT
Because "1" and "2" are strings and will NEVER match. Since they never
match, all records are skipped.
grep
> Trying to figure out skipif Why does this yield NO RECORDS
>
> {SKIPIF { COMPARE "1" = "2" } }
>
> When without it I have 50 records?