On Thu, Mar 12, 2009 at 10:46 AM, Uwe Brauer <oub(a)mat.ucm.es> wrote:
>>>>> "Sean" == Sean MacLennan
<seanm(a)seanm.ca> writes:
> On Thu, 12 Mar 2009 17:05:43 +0100
> Uwe Brauer <oub(a)mat.ucm.es> wrote:
>> Now in a function I want to execute certain code
>>
>> - if isp is indeed the string "hallo" and
>>
>> - if isp is the string "test" then another part of the code
>> will be executed.
> string= is your friend!
(defvar isp "hallo" )
> (if (string= isp "hallo") (message "hallo"))
I presumed it would be simple, but this simple!
Thanks
He said "simple". Heh, heh, heh, heh. `string=' is
typed. To be completely defensive against users
who will (setq isp 3.1415926) ; Happy National PI Day!
you need a guard as in:
(when (and (stringp isp) (string= isp "hallo"))
(message "hallo"))
-sb
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta