This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

char xdata *pointer _at_ postion : absolute illegal specifier

Hi

Why does this declaration not work:
char xdata *pointer _at_ postion;

but this one works:
char xdata array[1] _at_ postion;

Should be theoretically the same, or not?

Thanks Egon

Parents
  • I'm sure someone here could give you specific references to manuals, but you should consider how the compiler treats each.

    For simplicity, ignore the '_at' portion.

    char xdata *pointer is allocating space for a pointer, the location of the pointer is at a specific location, but the value of which is variable (i.e., non constant).

    char xdata array[1] is allocating space for a single byte of memory at a specific location (i.e., the location is constant).

    So, clearly, they are not the same.

Reply
  • I'm sure someone here could give you specific references to manuals, but you should consider how the compiler treats each.

    For simplicity, ignore the '_at' portion.

    char xdata *pointer is allocating space for a pointer, the location of the pointer is at a specific location, but the value of which is variable (i.e., non constant).

    char xdata array[1] is allocating space for a single byte of memory at a specific location (i.e., the location is constant).

    So, clearly, they are not the same.

Children