FW: How Come?

pickerij@norbord.com pickerij@norbord.com
Tue, 8 Dec 1998 17:37:40 -0500


Terry Pickering (no known relation) asks ...

>I know this has probably been explained before but.......
>
>Can someone explain in QUICK the difference in
>the following two syntax examples, and which is
>the "better" way to code.
>
>IF FIELD-AMT = 0
>   THEN ....
>
>IF 0 = FIELD-AMT
>   THEN ....

The syntax is "IF condition" where "condition" is one of   
"logical-function", "logical expression" and "predefined condition". And   
where "logical expression" is defined as "operand operator expression".   
And this applies throughout PH, not just in Quick.

Please note that the "expression" is on the right side of the operand. In   
your example above both "0" and "field-amt" are fine as operands so both   
versions will yield the same results. In your next example please note   
that you have an expression "field-amt - 10" on the left of the operand.

>IF FIELD-AMT - 10 = 0
>   THEN ....
>;(does not work)
>
>IF 0 = FIELD-AMT - 10
>   THEN ....
>;(works just fine)

John Pickering
JWP Systems Inc
Toronto  

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.