Path: utzoo!attcan!uunet!zephyr.ens.tek.com!tektronix!reed!bowman From: bowman@reed.UUCP (Eric Bowman) Newsgroups: comp.sys.mac.programmer Subject: Re: List Manager Strangeness Message-ID: <14318@reed.UUCP> Date: 1 Mar 90 08:01:30 GMT References: <20392@bellcore.bellcore.com> <10841@bsu-cs.bsu.edu> <3039@draken.nada.kth.se> Reply-To: bowman@reed.UUCP (Eric Bowman) Organization: Reed College, Portland OR Lines: 47 In article <3039@draken.nada.kth.se> d88-jwa@nada.kth.se (Jon W{tte) writes: >In article <10841@bsu-cs.bsu.edu> mithomas@bsu-cs.UUCP (Michael Thomas Niehaus) writes: > >> LGetCell(&listText,&dataLen,theCell,localList); >> listText[dataLen] = 0; >> if ( strcmp(&theText,&listText) == 0) > >listText is declared as char *, right ? So when you do LGetCell, >you get a char pointer, and you dereference it with offset dataLen. Right. >The problem is, why do you send the address of this pointer to strcmp ? Right again. >thing (in fact, you cannot take the address of an array in C...) ^^^^^^^ I don't think fact is the right word to use here...since this statement has nothing to do with truth. >or am i riding alone in never-never land again ? Pretty much. This is legitimate: char a[5],b[5],c[5],*d[3]; d[0]=&a; d[1]=&b; d[2]=&c; The beauty of C is no matter what weird and potentially pointless thing you want to do, you can do it. BobO bowman@reed.{bitnet,UUCP} "*or she. Masculine pronouns in this book are usually not intended to connote gender. Occasional chauvinistic comments are not to be taken seriously." - Donald E. Knuth, _The Art of Computer Programming_, vol 1 > h+@nada.kth.se == h+@proxxi.se == Jon Watte > longer .sig available on request