NAVAPAT_T

ABAP : logic OF and,or with ()

Aug 2nd, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 0.41 KB | None | 0 0
  1. DATA : a, b, c, d, e, f, x, t.
  2. x = 0. " mean false
  3. t = 1. " mean true
  4. *------
  5. a = 1.
  6. b = 1.
  7. c = 1.
  8. d = 1.
  9. e = 1.
  10. f = 1.
  11. ">>>>> no parentheses
  12. *if a = t or
  13. *   b = x and
  14. *   c = t or
  15. *   d = x and
  16. *   e = t .
  17. ">>>>  no parentheses
  18.   if  a = x or ( b = x and c = t ) or
  19.    ( d = x and e = t ).
  20.     WRITE : /'correct condition' COLOR 5.
  21.   else.
  22.     WRITE : /'incorrct condition' color 7.
  23.   ENDIF.
Advertisement
Add Comment
Please, Sign In to add comment