torturedmind
Programmer
good day to all.
i have the following codes:
my question is, why is it that the first code doesn't deduct 1 from variable m.qtyused while the second one does? simple as it may seem but it left me scratching my head.
kilroy![[knight] [knight] [knight]](/data/assets/smilies/knight.gif)
philippines
"Once a king, always a king. But being a knight is more than enough."
i have the following codes:
Code:
m.qtyused = m.qtyused - ;
IIF((m.qtyused > 1) ;
AND (ALLTRIM(m.payclass) = 'C') ;
AND (INLIST(ALLTRIM(m.ecode), "O2", "O4", "O6", "O8", "10")), 1, 0)
Code:
IF m.qtyused > 1 ;
AND (ALLTRIM(m.payclass) = 'C') ;
AND (INLIST(ALLTRIM(m.ecode), 'O2', 'O4', 'O6', 'O8', '10'))
m.qtyused = m.qtyused - 1
ENDIF
my question is, why is it that the first code doesn't deduct 1 from variable m.qtyused while the second one does? simple as it may seem but it left me scratching my head.
kilroy
![[knight] [knight] [knight]](/data/assets/smilies/knight.gif)
philippines
"Once a king, always a king. But being a knight is more than enough."