comp.lang.ada
 help / color / mirror / Atom feed
From: sk <sk@noname.com>
To: comp.lang.ada@ada.eu.org
Subject: Re: Access to array slices?
Date: Sat, 18 Jan 2003 22:32:43 -0600
Date: 2003-01-18T22:32:43-06:00	[thread overview]
Message-ID: <mailman.6.1042950604.265.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 5ad0dd8a.0301141717.2f1a9685@posting.google.com

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
------------------------------------




  parent reply	other threads:[~2003-01-19  4:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-15  1:17 Access to array slices? Wojtek Narczynski
2003-01-15  3:13 ` tmoran
2003-01-15 16:31   ` sk
2003-01-15 20:48     ` tmoran
2003-01-16  1:00       ` sk
2003-01-16  1:43         ` tmoran
2003-01-19  4:06     ` David Thompson
2003-01-15 14:44 ` Steve
2003-01-16  2:18   ` Wojtek Narczynski
2003-01-16  3:52     ` tmoran
2003-01-17 18:04     ` Warren W. Gay VE3WWG
2003-01-15 15:06 ` Stephen Leake
2003-01-16  2:02   ` Wojtek Narczynski
2003-01-16 16:18     ` Stephen Leake
2003-01-16 16:48 ` Victor Porton
2003-01-19  4:32 ` sk [this message]
2003-01-27  2:59   ` David Thompson
2003-01-24 19:02 ` Wojtek Narczynski
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox