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

more...

 Up
Pointer initialization and usage.         

Group: comp.lang.c.moderated · Group Profile
Author: Vickynathan
Date: May 8, 2008 00:20

The following code snippet works. I wonder how ? ( this is a code for
microcontroller )

void main (void){

unsigned char xdata * data pwrite;
unsigned char code * data pread;
unsigned char test_array [16];
unsigned char temp;
....
....
....

pwrite = (unsigned char xdata *) Scratch_Flash_Addr ; // I have
never seen such an initialization ??
pread = my_array ;

.....
.....

for ( i=0; i< sizeof( my_array); i++ ){
.....
temp = pread[i]; // How is this possible
without an indirection operator ?
.....
pwrite[i] = temp; // Again no indirection
operator ??
.....
}

Thanks

Vickynathan
--
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.
7 Comments
diggit! del.icio.us! reddit!