;; | --------------------------------------------------------------------------- ;; | MI_GetYesOrNo ;; | --------------------------------------------------------------------------- ;; | Function : Accept an input of Yes or No with default option ;; | Arguments: ;; | 'str' - Prompt String to display ;; | 'dflt' - Default Value ;; | The default value can be the strings "Yes" or "No", ;; | 1 or 0 (integers) ;; | Action : Returns string "Yes" / "No" or 1/0 depending on the input ;; | parameters ;; | Updated : September 25, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | --------------------------------------------------------------------------- (defun MI_GetYesOrNo ( str dflt / kwd _dflt ) (cond ((member dflt (list "No" 0)) (cond ((= #ProductLang "EN") (setq _dflt "No") ) ((= #ProductLang "DE") (setq _dflt "Nein") ) ((= #ProductLang "ES") (setq _dflt "No") ) ((= #ProductLang "RU") (setq _dflt "Нет") ) (T (setq _dflt "No") ) ) ) ((member dflt (list "Yes" 1)) (cond ((= #ProductLang "EN") (setq _dflt "Yes") ) ((= #ProductLang "DE") (setq _dflt "Ja") ) ((= #ProductLang "ES") (setq _dflt "Si") ) ((= #ProductLang "RU") (setq _dflt "Да") ) (T (setq _dflt "Yes") ) ) ) ) (cond ((= #ProductLang "EN") (setq _dflt (MI_GetKeyWords str _dflt (list "Yes" "No") nil)) ) ((= #ProductLang "ES") (setq _dflt (MI_GetKeyWords str _dflt (list "Si" "No") nil)) ) ((= #ProductLang "DE") (setq _dflt (MI_GetKeyWords str _dflt (list "Yes-DE" "No-DE") nil)) ) ((= #ProductLang "RU") (setq _dflt (MI_GetKeyWords str _dflt (list "Yes-RU" "No-RU") nil)) ) (T (setq _dflt (MI_GetKeyWords str _dflt (list "Yes" "No") nil)) ) ) (if (member dflt (list 0 1)) (progn (if (member _dflt (list "Si" "Yes" "Yes-DE" "Yes-RU")) (setq _dflt 1) (setq _dflt 0) ) ) (progn (cond ((member _dflt (list "Si" "Yes" "Yes-DE" "Yes-RU")) (setq _dflt "Yes") ) ((member _dflt (list "No" "No-DE" "No-RU")) (setq _dflt "No") ) ) )) _dflt )