Re: Pointer initialization and usage.
  Home FAQ Contact Sign in
comp.lang.c.moderated only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Pointer initialization and usage.         

Group: comp.lang.c.moderated · Group Profile
Author: Hans-Bernhard Bröker
Date: May 9, 2008 15:33

Vickynathan wrote:
> The following code snippet works. I wonder how ?

It works by its author having read the applicable documents (a C
textbook, and the particular compiler's documentation) and learning from
them. I suggest you try that, too.
> pwrite = (unsigned char xdata *) Scratch_Flash_Addr ; // I have
> never seen such an initialization ??

There's nothing magical about it. See the C textbook on what (unsigned
char *) would mean, and the compiler documentation on the meaning of
'xdata'. See the rest of the source code to understand where
Scratch_Flash_Addr might be coming from.
> temp = pread[i]; // How is this possible
> without an indirection operator ?

By reading the C textbook.
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
no comments
diggit! del.icio.us! reddit!