Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!ucbvax!pasteur!agate!shelby!daemon From: shiffman@sumex-aim.stanford.edu (Smadar Shiffman) Newsgroups: comp.sys.next Subject: re: Null Selector (was Re: Question about Objective-C's @selector) Message-ID: <2225@shelby.Stanford.EDU> Date: 18 Jul 90 15:23:22 GMT Sender: daemon@shelby.Stanford.EDU Lines: 20 In his posting from Jul 18 neveu@fugitive.berkeley.edu writes >I have a question about SEL variables. How do you initialize a SEL variable >to have an invalid, or null, value. That is, I have a SEL variable that I >want to initialize to a value that is invalid; some part of the program will >set the value to a valid selector; another part of the program will check >the value to determine whether it is valid and if it is, send that message >to an object. >So what do I initialize the variable to? 0? -1? (int) NULL? SEL is defined in /usr/include/objc/objc.h : typedef unsigned int SEL; As far as I know 0 is not used for any selector (you can see that by requesting 'info selector' when running gdb with some application). I would try using 0 as an 'invalid' selector. Smadar -------