From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dbaf05888e191cb6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-18 20:30:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!freenix!enst.fr!not-for-mail From: sk Newsgroups: comp.lang.ada Subject: Re: Access to array slices? Date: Sat, 18 Jan 2003 22:32:43 -0600 Organization: ENST, France Message-ID: References: <5ad0dd8a.0301141717.2f1a9685@posting.google.com> Reply-To: "comp.lang.ada mail to news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1042950605 63974 137.194.161.2 (19 Jan 2003 04:30:05 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sun, 19 Jan 2003 04:30:05 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020828 X-Accept-Language: en-us, en X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:33191 Date: 2003-01-18T22:32:43-06:00 tmoran@acm.org > it will usually have "chars **buf" or "Handle *h" where ... A handy rule of thumb which I hope to remember (I think that "Handle *h" is largely a MS/Window thing isn't it ?). david.thompson1@worldnet.att.net > Allocation has nothing to do with it; a C routine cannot > allocate unless it *returns* a pointer or receives a pointer > *to* a pointer (or receives a pointer to or returns a struct > *containing* a pointer, but that's much rarer). I seem to recall that some of the Window C routines allocated some of the data structures internally and passed a (or updated a passed in) pointer back to the caller ? One of my major headaches is "char *" being used instead of "struct sometype *" and not noticing until things blow up and I have to look at the man pages. > readlink actually *could* have been designed and specified I only had trouble with "readlink" until I RTFM'd. It looked like the prototype of something else that I was binding to but it turns out the parameters behaved differently after all. I guess there is no replacement for RTFMing to get the parameters correct, no fancy and handy Char_Array trickery to save the day :-( Cheers -- -- -- Merge vertically for real address -- ------------------------------------ -- s n p @ t . o -- k i e k c c m ------------------------------------