Skip to main content
Apr 13, 2017 3:07 PM UTC
Solved

ProProgram syntax

I have defined a condition for a feature creation in ProProgram which works fine:

IF D42 > 0

...blah...feature definition...

ENDIF

But trying to add a second condition yields this error:

IF D42 > 0 AND D48 > D43

!*** ERR: line contains a bad symbol or is otherwise invalid

Same goes for this attempt:

IF D42 > 0 AND IF D48 > D43

!*** ERR: line contains a bad symbol or is otherwise invalid

I assume this is a syntax error. Can someone please help me out with this?

BenLoosliAnswer
Apr 13, 2017 3:29 PM UTC

The conjunction operand is &, not AND.

IF D42 > 0 & D48 > D43

   expressions

ENDIF

You can evaluate any Pro/Program relations in the standard relation editor to see is they work before moving the code to the program.

Check out the WF4 Help Topic Collection Fundamentals.pdf for the symbol syntax for relations.

3 replies

Apr 13, 2017 3:19 PM UTC

A colleague suggested nesting the ifs like this (and it works):


IF D42 > 0

IF D48 > D43

...blah...feature definition...

ENDIF

ENDIF

Still I wonder if there is a way to do the two conditions in one if nest?

BenLoosliAnswer
Apr 13, 2017 3:29 PM UTC

The conjunction operand is &, not AND.

IF D42 > 0 & D48 > D43

   expressions

ENDIF

You can evaluate any Pro/Program relations in the standard relation editor to see is they work before moving the code to the program.

Check out the WF4 Help Topic Collection Fundamentals.pdf for the symbol syntax for relations.

Apr 13, 2017 4:00 PM UTC

That works. Thank you.