Hi Caleb wrote...
The general consensus of replies confirms my findings of how
> this was originally meant to be nested.  Thanks for all your help.
>
> Caleb
>
> >>> [EMAIL PROTECTED] 12/08/05 12:09PM >>>
> IF P(2)-AR(12)<=28 THEN
>    CC=CC+1
>    INS 0 BEFORE AR(14)<1,1>
>    DEL AR(14)<1,9>
> END ELSE
>    IF AR(13)=DATE() THEN
>       CC=CC ELSE INS 1 BEFORE AR(14)<1,1>
>       DEL AR(14)<1,9>
>    END
> END

as the translation of :

IF P(2)-AR(12)<=28 THEN CC=CC+1; INS 0 BEFORE AR(14)<1,1>; DEL AR(14)<1,9>; ELSE IF AR(13)=DATE() THEN CC=CC ELSE INS 1 BEFORE AR(14)<1,1>; DEL AR(14)<1,9>

I hate to be pedantic but I think that's wrong...[or maybe just a typo?] - If it compiled (which I doubt, due to the isolated ELSE ) it would result in the AR(14)<1,9> value being deleted where AR(13)=DATE(), when only the CC=CC (pointless?!?) should be executed. Viz:

IF P(2)-AR(12)<=28 THEN
   CC=CC+1
   INS 0 BEFORE AR(14)<1,1>
   DEL AR(14)<1,9>
END ELSE
   IF AR(13)=DATE() THEN
      CC=CC ; * This is meaningless!
   END ELSE
      INS 1 BEFORE AR(14)<1,1>
      DEL AR(14)<1,9> ; * this only happens where AR(13) NE DATE()
   END
END

Hope that doesn't confuse? (Well, it won't confuse as much as rendering the assembler code would!)

As a general rule... break the line after any THEN statement, ';' line break, before 'ELSE' (and add the END before it) then add an END for each END ELSE/THEN statement as appropriate. Simple really!

Gary
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to