What is the best way to test if a bit is 1 or 0?

 

I'm doing this but was thinking there may/probably is a better way:

 

If substr(x2b(c2x(flag1)),6,1)  = 1 then say 'got  it'

 

 

Lionel B. Dyck <><

Website:  <https://www.lbdsoftware.com> https://www.lbdsoftware.com

Github:  <https://github.com/lbdyck> https://github.com/lbdyck

 

"Worry more about your character than your reputation. Character is what you
are, reputation merely what others think you are."   - - - John Wooden

 


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to