hexagon logo

PCDMIS True/False Variable Issue

All,

From what I understand, a variable in a PCDMIS conditional statement PCDMIS evaluates True / False conditionals by checking ONLY if the numeric value is ZERO (aka False). Anything else evaluates to True.

In Example 1, the Operator Comment does NOT execute:

ASSIGN/V1=0
IF/V1
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
Hello!
END_IF/ 

In Example 2, the Operator comment executes if V1 is anything OTHER THAN ZERO.

ASSIGN/V1=3
    IF/V1
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
    Hello!
END_IF/

Has anyone found this NOT to work as described above?

Are there issues if the variable holds a string value?

Thanks,

Mike (in snowy Buffalo)

Parents
  • I believe (I don't know for sure RE PC-DMIS) it's standard programming practice that if a variable holds any value other than 0 for numeric or NULL for strings, it should return 1 (True). However, I was also taught that there should always be an explicit conditional for IF statements. Ex. IF A=3 or IF B="SOMETHING" THEN

    Dis (In less-snowy Rochester)

Reply
  • I believe (I don't know for sure RE PC-DMIS) it's standard programming practice that if a variable holds any value other than 0 for numeric or NULL for strings, it should return 1 (True). However, I was also taught that there should always be an explicit conditional for IF statements. Ex. IF A=3 or IF B="SOMETHING" THEN

    Dis (In less-snowy Rochester)

Children
No Data