delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/29/10:00:40

From: Sinan_Unur AT mail DOT com (A. Sinan Unur)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Are THESE two statements EQUAL?
Date: 29 Jun 2000 13:29:19 GMT
Organization: Cornell University
Lines: 37
Sender: verified_for_usenet AT cornell DOT edu (asu1 on 128.253.251.163)
Message-ID: <8F626A568ASINANUNUR@132.236.56.8>
References: <5t7klskbj285civf9serk693otnho6t5j0 AT 4ax DOT com> <7qmkls0k46jupmhklc5sqesf999hn7vmjl AT 4ax DOT com> <8F61A359BASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <mvbllska0qcuhbt0iau00jdn2vp078mon7 AT 4ax DOT com>
NNTP-Posting-Host: 128.253.251.163
X-Trace: news01.cit.cornell.edu 962285359 22312 128.253.251.163 (29 Jun 2000 13:29:19 GMT)
X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu
NNTP-Posting-Date: 29 Jun 2000 13:29:19 GMT
User-Agent: Xnews/03.04.11
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

sproctor AT ccs DOT neu DOT edu (Sean Proctor) wrote in
<mvbllska0qcuhbt0iau00jdn2vp078mon7 AT 4ax DOT com>: 
>ummm, you're just wrong...
>
>struct blah
>{
>     int whatever;
>};
>
>typedef struct blah     blub;
>typedef struct *blah     blab;
>
>blub *a[60];
>blah b[60];
>
>oh look... they're the same... huh... imagine the irony... one type...
>and a pointer to a different type... *and they're the same thing*!!!
>Don't hate me, I'm just in a bad mood.

however, as the user of allegro's api (or your blah-blub api), i shouldn't 
know or care about the actual implementation of these data structures. as far 
as the user of your api is concerned, blub and blab are separate types, and a 
pointer to blub is conceptually different than an element of type blah.

as for BITMAP and PALLETE, all one should care about is the API through which 
you access these structures (that is the whole point why you are provided with 
a BITMAP data type rather than an array of int.) further, BITMAP and PALLETE 
are logically separate concepts regardless of any affinity that might exist 
between their underlying implementations.

you'll have fewer problems if you keep these in mind.

Sinan.
-- 
--------------------------------
A. Sinan Unur
http://www.unur.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019