0 Members and 1 Guest are viewing this topic.
OK, maybe I'm just thick. Is one of these 2 snippets correct? Are they the same?
For me a simpler way to read the condCode: [Select] (cond ((wcmatch txt1 "UPD Not Found"))(setq txt TXT1)) ((wcmatch txt2 "UPD Not Found"))(setq txt TXT2)) ((null FULL))(setq txt full) ((setq txt "NO TAG#")) );;_end cond
(cond ((wcmatch txt1 "UPD Not Found"))(setq txt TXT1)) ((wcmatch txt2 "UPD Not Found"))(setq txt TXT2)) ((null FULL))(setq txt full) ((setq txt "NO TAG#")) );;_end cond
(cond ((wcmatch txt1 "UPD Not Found")(setq txt TXT1)) ((wcmatch txt2 "UPD Not Found")(setq txt TXT2)) ((null FULL)(setq txt full)) ((setq txt "NO TAG#")) );;_end cond
This is what I eventually ended up with (and is working nicely).
_$ (setq TAG1 nil)nil_$ (not (or (wcmatch TAG1 "UPD Not Found,0,") (null TAG1))); erreur: type d'argument incorrect: stringp nil_$ (not (or (null TAG1) (wcmatch TAG1 "UPD Not Found,0,")))nil
Just a small note, it is better to check if the variable is null first:Code: [Select]_$ (setq TAG1 nil)nil_$ (not (or (wcmatch TAG1 "UPD Not Found,0,") (null TAG1))); erreur: type d'argument incorrect: stringp nil_$ (not (or (null TAG1) (wcmatch TAG1 "UPD Not Found,0,")))nil