Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uwm.edu!linac!att!ucbvax!SLIC.CELLBIO.DUKE.EDU!jit From: jit@SLIC.CELLBIO.DUKE.EDU (Jit Keong Tan) Newsgroups: comp.sys.sgi Subject: Re: Calling real c-men... Message-ID: <9104090408.AA12355@slic.cellbio.duke.edu> Date: 9 Apr 91 04:08:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: jit@slic.cellbio.duke.edu Organization: The Internet Lines: 65 In article <9104082133.AA15472@karron.med.nyu.edu> >>void NitherNoid(int mm,float llist[][2][3],float point[3]); This is no difference than void NitherNoid(int mm,float llist[][][],float point[]); or void NitherNoid(int mm, float ***llist, float *point); the compiler will ignore the dimension that you declare in function prototyping. ---- >> float *svd_line_list[2][3]; /* a list of pointers to lines */ >> svd_line_list=(void *)0; (I suppose you mean float * instead of void * cast) There is a misconception of array and pointers here. you first declare svd_line_list as an array, then you treat it as a pointer, this is wrong. Because you did not tell the compiler where you want to store the value (float *)0 Let's do it step by step, (and I hope this is what you want) 1) svd_line_list[0][0] = (float *)0; /* assign 1st element to be NULL */ 2) *svd_line_list[0] = (float *)0; /* same thing */ /* same difference, just look more impressive :-) */ 3) **svd_line_list = (float *)0; For all other similar problems, if you do the translation step by step in terms of array before converting them into pointers, lots of problem can be avoided. I didn't try to read carefully want you want but I guess you are trying to pass the dimension of array into a function. How about include its dimension in the structure such as typedef struct CompositeTag { int hot_spots = HOT_SPOTS; /* <==== These two are added */ int hot_lines = HOT_LINES; /* <==== These two are added */ struct LineTag *HotLinePointer; struct LineTag SkeweringLines[HOT_SPOTS][HOT_LINES]; struct LineTag LineTween[HOT_SPOTS][HOT_LINES]; Matrix CompositeMatrix; int NumberCompositeStacks,HotStack, HotSlice,HotCardinal,HotLine; char CompositeName[80]; } Composite; Because C doesn't care about array bound at all. Hope this help. -------------------------------------------------------- Jit Keong Tan | internet: jit@slic.cellbio.duke.edu (919) 684-8098 | bitnet : tan00001@dukemc.bitnet -------------------------------------------------------- U.S. Mail: Duke University Medical Center Department Of Cell Biology Box 3709 Nanaline Duke Bldg, Rm. 349 Durham, NC 27710