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

Want to know the difference

I want to know the differences between the following two definiations:

 (*((volatile char xdata *)( CHIP_BASE + i)))

 ((volatile char xdata *)( CHIP_BASE + PTR_BASE + PTR_SIZE * i))

Thank you.

Parents
  • Really? The OP asked:
    "I want to know the differences between the following two definiations:"

    Now, does that sound like 'what are the types of these expressions as a whole' to you?


    No, but the overall type most definitely is one of the "differences between the ... definitions" that he did ask about.

    The internal structure of both expressions does indeed involve pointers. But by no stretch of the imagination does that imply that "they are both pointers", as you wrote here in your first contribution to this thread. Of the two things covered by that word "they", only one actually is a pointer, the other only contains one. I really hope you don't seriously believe this to be a negligible difference.

Reply
  • Really? The OP asked:
    "I want to know the differences between the following two definiations:"

    Now, does that sound like 'what are the types of these expressions as a whole' to you?


    No, but the overall type most definitely is one of the "differences between the ... definitions" that he did ask about.

    The internal structure of both expressions does indeed involve pointers. But by no stretch of the imagination does that imply that "they are both pointers", as you wrote here in your first contribution to this thread. Of the two things covered by that word "they", only one actually is a pointer, the other only contains one. I really hope you don't seriously believe this to be a negligible difference.

Children
  • "The internal structure of both expressions does indeed involve pointers. But by no stretch of the imagination does that imply that "they are both pointers", as you wrote here in your first contribution to this thread."

    Your snippage of context has altered the quote. What I wrote was:

    "No, they are both pointers. The difference is that the first one is being dereferenced."

    This was in response to the OP's assertion that the first was a variable.

    "Of the two things covered by that word "they", only one actually is a pointer, the other only contains one."

    Do you disagree that the first one is a dereferenced pointer?

    "I really hope you don't seriously believe this to be a negligible difference."

    Don't be silly.