Dangerous syntax this pick style locate. It ooks like a function but it isn't. Actually it is a statement with THEN ELSE clauses. Once you realise that it's crystal clear .
You can't write IF READ ... and you can't write IF LOCATE() ... but you can write WHILE READ and WHILE LOCATE() as you can with any statement with an ELSE clause.
/Mats
Glenn W. Paschal wrote:
Actually, "LOOP WHILE LOCATE" is incorrect syntax, and will fail on
compilation. You have to use the PICK flavor of LOCATE to do this.
Still, you are correct in that "LOOP WHILE LOCATE()" works fine, but "IF LOCATE() THEN" will not compile. A side note, TRUE.FALSE.FLAG = LOCATE() also will not compile.
However, if instead of using "IF LOCATE() THEN", you simply use "LOCATE() THEN" it will work.
I realize you were venting, and I must agree in part that it would appear to present somewhat of an inconsistency, but I can more see why "IF LOCATE()" would not work, than I can tell you why "WHILE LOCATE()" does work. I would have expected neither to work.
H
---- <snip>-----
-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users