;; | ---------------------------------------------------------------------------- ;; | MI_AddBit ;; | ---------------------------------------------------------------------------- ;; | Function : Add a bit code value to a number if it does not exist ;; | Arguments: 'num' - Number to process ;; | 'bit' - Bit to add ;; | Returns : The number with the passed bit added, it it does not already exist ;; | Otherwise, the same number is returned. ;; | Updated : March 12, 1999 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun MI_AddBit( num bit ) (if (zerop (logand num bit)) (setq num (+ num bit)) ) num )